Salta al contenuto

Regarding the format of "basicAuthCredentials" returned by the aws amplify get-app command

0

I have a question about the format of the "basicAuthCredentials" returned by the aws amplify get-app command. The official documentation (https://awscli.amazonaws.com/v2/documentation/api/latest/reference/amplify/get-app.html) states, "The basic authorization credentials for branches for the Amplify app. You must base64-encode the authorization credentials and provide them in the format user:password." However, it seems that the output is not in this format.

Specifically, the "user" is returned, but the "password" part does not match what was provided.

For example, if I base64 encode and set "aaa:aaaaaaa", the return is "YWFhOll5dmhqaGY0YXRDdW1FUEo5L3IzL3c9PXx8MmdnNWd2ckNLNjBSYlc3ZEdNSmQ0NU5lYzZtbXNCWllrUzhrVmdqY1lERT0=", and base64 decoding it results in "aaa:Yyvhjhf4atCumEPJ9/r3/w==||2gg5gvrCK60RbW7dGMJd45Nec6mmsBZYkS8kVgjcYDE=", where the set password cannot be retrieved.

Could you please provide more information about this? Thank you!

1 Risposta
1
Risposta accettata

Hello, I'm Ito a cloud support engineer at AWS.

Unfortunately, the BasicAuthCredentials property in the Amplify Hosting App does not disclose specific formats. The only publicly available format is that it's a string. [1]

As for the current behavior, the user: part is a base64 encoded string, the password part is a string with service side encryption in response, and there is no way for the user side to decrypt password.

If you've lost your password, try setting a new one. [2]


[1] App - Amplify
https://docs.aws.amazon.com/amplify/latest/APIReference/API_App.html

basicAuthCredentials

The basic authorization credentials for branches for the Amplify app. You must base64-encode the authorization credentials and provide them in the format user:password.
Type: String
Length Constraints: Maximum length of 2000.
Pattern: (?s).*
Required: No

[2] Restricting access to branches - AWS Amplify Hosting
https://docs.aws.amazon.com/amplify/latest/userguide/access-control.html

AWS
con risposta 2 anni fa
  • Thank you very much! I got it.

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.