-
Notifications
You must be signed in to change notification settings - Fork 634
Open
Labels
bugThis issue is a bug.This issue is a bug.p2This is a standard priority issueThis is a standard priority issueservice-apiThis issue is due to a problem in a service API, not the SDK implementation.This issue is due to a problem in a service API, not the SDK implementation.
Description
Checkboxes for prior research
- I've gone through Developer Guide and API reference
- I've checked AWS Forums and StackOverflow.
- I've searched for previous similar issues and didn't find any solution.
Describe the bug
When using the getAuthorizationToken command to obtain a token, the length of the obtained token reached 2368, which is far beyond the length obtained by executing aws ecr get-login-password with aws cli. This excessively long token is an extremely poor feature because most automation frameworks only support a maximum password length of 2048 for Docker, making it impossible for AWS's Docker registry to work with these automation frameworks.
Regression Issue
- Select this option if this issue appears to be a regression.
SDK version number
@aws-sdk/[email protected]
Which JavaScript Runtime is this issue in?
Node.js
Details of the browser/Node.js/ReactNative version
Node.js v18.18.2
Reproduction Steps
const { ECRClient, GetAuthorizationTokenCommand } = require('@aws-sdk/client-ecr')
const awsKey = 'xxx'
const awsSecret = 'xxx'
const client = new ECRClient({
region: 'us-east-1',
credentials: {
accessKeyId: awsKey
secretAccessKey: awsSecret
}
})
const run = async () => {
const command = new GetAuthorizationTokenCommand({})
const response = await client.send(command)
console.log(response.authorizationData, response.authorizationData[0].authorizationToken.length)
}
run().then(() => process.exit(0))
The length will be 2368(too long)
Observed Behavior
response.authorizationData[0].authorizationToken.length is 2368, the token is too long for most framework
Expected Behavior
return shorter length token(less than 2000)
Possible Solution
No response
Additional Information/Context
No response
postsa
Metadata
Metadata
Assignees
Labels
bugThis issue is a bug.This issue is a bug.p2This is a standard priority issueThis is a standard priority issueservice-apiThis issue is due to a problem in a service API, not the SDK implementation.This issue is due to a problem in a service API, not the SDK implementation.