Comments (5)
Looks like I was using an incorrect ACCESS/SECRET key pair. I think the exception should convey the problem with a clearer message.
from aws-encryption-sdk-java.
Hello behrangsa,
I am trying to use a encryption key (using AWS Encryption SDK). I am getting the same error.
My key is like "arn:aws:kms:us-east-1:XXXXXXXXXX:_key/yyyyy-yyyy-yyyy-yyyy-yyyy"
I have set the environment variable 'AWS_ACCESS_KEY = arn:aws:kms:us-east-1:XXXXXXXXXX' and 'AWS_SECRET_KEY = key/yyyyy-yyyy-yyyy-yyyy-yyyy'.
I am getting error: Exception in thread "main" com.amazonaws.services.kms.model.AWSKMSException: The
security token included in the request is invalid. (Service: AWSKMS; Status Cod
e: 400; Error Code: UnrecognizedClientException; Request ID: 93d79101-e8c8-11e6-
af94-ed78adcea1db).
Can you please let me know what is the correct value for access_key and secret_key?
from aws-encryption-sdk-java.
@jimiparekh This is unrelated to the encryption SDK. The AWS_ACCESS_KEY and AWS_SECRET_KEY are the AWS credentials you use to call KMS (and other possible services).
from aws-encryption-sdk-java.
SalusaSecondus,
Thanks for your response. So you mean to say its my username/password which I use to login to AWS?
from aws-encryption-sdk-java.
@jimiparekh Not quite. The user-name password is what you use when you're logging into the console. The access_key/secret_key are programmatic credentials. I recommend you read through Understanding and Getting Your Security Credentials, especially the section related to Access Keys.
from aws-encryption-sdk-java.
Related Issues (20)
- AWSCredentialsProvider Not Found HOT 1
- AWSCredentialsProvider Not Found HOT 2
- CVE-2023-33201 - new Encryption SDK release? HOT 1
- AwsKmsMrkAwareMasterKeyProvider always attempts to resolve defaultRegion through DefaultAwsRegionProviderChain HOT 3
- Need to generate data key without plaintext HOT 3
- Maven Compile Warning for SuppressFBWarnings HOT 3
- Intermittent exception in thread "main" com.amazonaws.encryptionsdk.exception.CannotUnwrapDataKeyException: Unable to decrypt any data keys HOT 3
- Intermittently we get "com.amazonaws.encryptionsdk.exception.CannotUnwrapDataKeyException: Unable to decrypt any data keys" caused by "com.amazonaws.encryptionsdk.exception.NoSuchMasterKeyException: Key must be in supplied list of keyIds" HOT 1
- IllegalArgumentException getting a master key due to localization HOT 1
- Chore: Audit Dependencies HOT 1
- V2 KmsMasterKeyProvider - cannot set Synch client - need to set proxy HOT 1
- Thread Pinning With Virtual Threads HOT 1
- Need to encrypt and decrypt with separate AWS account. How to specify the AWS access key and secret key programatically HOT 1
- [Question] en/decryptData with CryptoMaterialsManager is deprecated, how to migrate to non-deprecated? HOT 10
- Why software.amazon.awssdk:dynamodb is not a dependency
- [Question] Migrating from 2.4.1 to 3.0.0 HOT 1
- Encryption Context for DecryptionMaterials on v3.0.0 HOT 4
- How to compile into arm architecture can be used. solibrary HOT 1
- JavaDocs: Document replacement methods for MKP methods HOT 1
- Getting BadCiphertextException: Invalid version HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aws-encryption-sdk-java.