aboutsummaryrefslogtreecommitdiff
path: root/python
AgeCommit message (Collapse)Author
2023-07-20Use a copy of testdata/gcp/credential_bad.json for testdata/gcp/credential.jsonambrosin
PiperOrigin-RevId: 549602714
2023-07-19Simplify Python JWT verification example.juerg
Supporting two public key formats in this example is not necessary. It is better to only use JWK sets, which is probably the most common use case. This change make the example more similar with the Java example. PiperOrigin-RevId: 549281076
2023-07-18Simplify remaining example in Python.juerg
Register should always work, when it fails it's a bug, so it's better to not catch that exception. PiperOrigin-RevId: 549090205
2023-07-17Skip tests in tink/integration/gcpkms on manylinux2014_aarch64.ambrosin
These currently fail with ``` ImportError: /opt/python/cp310-cp310/lib/python3.10/site-packages/grpc/_cython/cygrpc.cpython-310-aarch64-linux-gnu.so: undefined symbol: _ZTVNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE ``` See https://github.com/grpc/grpc/issues/33734. PiperOrigin-RevId: 548699295
2023-07-17Install Tink wheel dependencies from requirements.txt when testingambrosin
PiperOrigin-RevId: 548690159
2023-07-14Use the correct wheel name when testing on ARM64ambrosin
PiperOrigin-RevId: 548089740
2023-07-13Allow building Python wheels for aarch64 Linuxambrosin
Also use a more recent Manylinux image for x84_64. PiperOrigin-RevId: 547801596
2023-07-13Simplify JWT example in Python.juerg
Register should always work, when it fails it's a bug, so it's better to not catch that exception. PiperOrigin-RevId: 547728738
2023-07-12Simplify Python examples that use a KMSambrosin
Avoid registering the GcpKmsClient and directly create aead.KmsEnvelopeAead. PiperOrigin-RevId: 547496577
2023-07-12Small fixes in python JWT examples.juerg
PiperOrigin-RevId: 547437927
2023-07-07chore: Improvements to Linux bdist scriptambrosin
* Use Bazelisk instead of Bazel. Bazelisk takes care of using the correct version of Bazel using .bazelversion * Install protoc 21.12 * Verify SHA256 when installing protoc and Bazelisk * Remove unneeded call to `bazel clean --expunge`, since this is done as a first step by setup.py PiperOrigin-RevId: 546261721
2023-07-07Include .bazelversion in MANIFEST.inambrosin
Without it, when used, bazelisk will download and use the latest Bazel available. PiperOrigin-RevId: 546243630
2023-07-04Add test that shows that the Aead object returned by tink.KmsEnvelopeAead is ↵juerg
compatible with the Aead generated using create_kms_envelope_aead_key_template. At the same time, clean-up some of the other tests. PiperOrigin-RevId: 545411901
2023-06-27Fix lint errors in some Python key template functions.juerg
PiperOrigin-RevId: 543684366
2023-06-26Let KMS envelope key manager reject invalid DEK templates.juerg
PiperOrigin-RevId: 543424290
2023-06-26Fix some lint errors in _aead_key_templates.pyjuerg
PiperOrigin-RevId: 543405912
2023-06-22Restrict KMS envelope AEAD to only use Tink AEAD key types as DEK.juerg
KMS Envelope AEAD is a simple way to encrypt data. So using custom implementations of AEAD is not needed for this. This also prevents the user from using the envelope encryption key type as DEK by accident. This change will help us simplify our implementation of KMS Envelope AEAD, because we will be able to remove the dependency on Tink's Registry. PiperOrigin-RevId: 542549805
2023-06-18Fix sdist WORKSPACE patching.ckl
PiperOrigin-RevId: 541527414
2023-06-16Use pybind11_bazel rules and remove custom rules in ↵ambrosin
tools/build_defs/tink_python_rules.py PiperOrigin-RevId: 540800924
2023-06-14Update KmsEnvelopeAeadTests in Python.juerg
- Test all supported Tink AEAD key types as DEK. - Test invalid associated data. - Replace unused variables with _. - Update comment in the test that checks the wire format is correct. PiperOrigin-RevId: 540266669
2023-06-13Set TINK_PYTHON_SETUPTOOLS_OVERRIDE_BASE_PATH from create_release.shambrosin
This is needed to later give the caller the option of building the binary wheel without overriding the WORKSPACE file. PiperOrigin-RevId: 539928659
2023-06-13Upgrade requirements.txt using pip-compile ... --upgradeambrosin
PiperOrigin-RevId: 539905671
2023-06-12Fix Tink dependency location specified in the Python sdist.ckl
PiperOrigin-RevId: 539706681
2023-06-07Remove client-side decryption key ID verification in Python.ckl
This isn't necessary since it duplicates the server side check done when the KeyID is included in the decryption request. This also enables support for using key aliases. PiperOrigin-RevId: 538511498
2023-06-06Fixes to tink-py requirement filesambrosin
- Use less restrictive constraints for tink-py deps (google/tink#695) and examples - Remove `constraints.in` - Upgrade dependencies in `requirements.txt` and `examples/requirements.txt` - Use `--require-hashes` when installing `examples/requirements.txt` PiperOrigin-RevId: 538165507
2023-06-06Copybara import of the project:ambrosin
-- 4dc279cf4bf26160adc42bcba3bcb3717a9a5524 by dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>: Bump requests from 2.28.1 to 2.31.0 Bumps [requests](https://github.com/psf/requests) from 2.28.1 to 2.31.0. - [Release notes](https://github.com/psf/requests/releases) - [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md) - [Commits](https://github.com/psf/requests/compare/v2.28.1...v2.31.0) --- updated-dependencies: - dependency-name: requests dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> PiperOrigin-RevId: 538105391
2023-05-24Implement a key commitment integration test.ckl
PiperOrigin-RevId: 534929793
2023-04-28Encode integers as integers in JWT payload.juerg
- add tests in C++, Go and Python that these languages already do this. - overload the addNumberClaim so that this also works in Java. PiperOrigin-RevId: 528083180
2023-04-28Only add http_archive load statement if not already present.ckl
PiperOrigin-RevId: 528007292
2023-04-28Document support for 3.10 in the package classifiers.ckl
PiperOrigin-RevId: 527815662
2023-04-28Fix protoc discovery.ckl
PiperOrigin-RevId: 527809046
2023-04-27Document how Tink handles associatedData='' in AES SIV.juerg
AES SIV allows the user to import a list of associated datas, but Tink only uses a single associated data in its interface. When the user inputs an empty associated data byte sequence, Tink will handle this as a list of one empty byte sequence, and not as an empty list. PiperOrigin-RevId: 527491521
2023-04-19Reject other key URIs in GCP KMS integration in Python.juerg
If the KmsClient is bound to a key URI, it should reject all other key URIs. PiperOrigin-RevId: 525378446
2023-04-14Remove dependency on tink-cc-{aws,gcp}kms from tink-py examples.ambrosin
PiperOrigin-RevId: 524249515
2023-04-14Update setup.py to account for the fact that tink-cc-{aws,gcp}kms are no ↵ambrosin
longer dependencies. PiperOrigin-RevId: 524229076
2023-04-13Remove dependency on tink-cc KMS extensions from tink-pyambrosin
This is no longer needed because KMS extensions are now natively implemented in Python. PiperOrigin-RevId: 524119016
2023-04-12Remove public visibility from examples.tholenst
There is no reason anyone would run these from other targets. #tinkApiChange Remove public visibility of build targets -- they were never intended to be public. PiperOrigin-RevId: 523625552
2023-04-05Allow AwsKmsClient in Python to use default credentials.juerg
The old AwsKmsClient (based on C++ version) allowed default credentials by setting credentials_path = ''. The new version does not allow this anymore, which is a bug. This change fixes that bug. The change also allows the parameters to be None and not just '', which is the pythonic way to pass optional parameters. And we also properly annotate them. PiperOrigin-RevId: 522047566
2023-04-04Call reset_kms_client after each test in aws kms integration tests in Python.juerg
PiperOrigin-RevId: 521675560
2023-04-03Remove AWS and GCP KMS wrapping of C++ code.juerg
This is not needed anymore, as we are anow using Python implementations. PiperOrigin-RevId: 521468455
2023-04-03Implement GCP KMS integration in Python, without wrapping C++ version.juerg
PiperOrigin-RevId: 521439181
2023-04-03Add _kms_aead_key_manager.reset_kms_client function and refactor some tests.juerg
This function is not part of the public API. By calling reset_kms_client after each test, the tests that register clients don't have side-effects, which is preferable. Also, move the tests that register GCP KMS clients into the same file, and always call register at the beginning of each test instead of these module setup. PiperOrigin-RevId: 521430908
2023-04-03Remove wrapping of C++ fake KMS client.juerg
This is not needed anymore, since the fake KMS client is now implemented in Python. PiperOrigin-RevId: 521408438
2023-03-29Let AWS KMS integration in Python use boto3 instead of wrapping the C++ ↵juerg
integration. This should not change the behavior of the current API, it implements the same as cc/integration/awskms/aws_kms_client.cc in Python. PiperOrigin-RevId: 520254665
2023-03-28Add test using default credentials, and allow credential_path to be None.juerg
PiperOrigin-RevId: 520027764
2023-03-27Fix bug in fake KMS implementation in Python.juerg
does_support should always return False for other KMSs. PiperOrigin-RevId: 519765775
2023-03-27Refactor tests for AWS KMS integration in Python.juerg
Make them similar to the GCP KMS integration tests. Also, move the test of the register function into the integration tests, and check that register really worked. PiperOrigin-RevId: 519666171
2023-03-23Internal Code ChangeTink Team
PiperOrigin-RevId: 518816624
2023-03-23Allow key_uri=None parameter in gcpkms.GcpKmsClient.juerg
Also, remove the registration test, because registration is tested in _gcp_kms_integration_test.py. And rewrite some other tests. PiperOrigin-RevId: 518800724
2023-03-22Rename _aws_kms_aead_test.py to _aws_kms_integration_test.py.juerg
These are integration tests that make RPC calls to the real KMS. So it is better to put the word "integration" in the file name. PiperOrigin-RevId: 518548866