SAService Architect Back to designer
SAService ArchitectDocumentation
Python DSL reference ServiceArchitectClient.from_env()

Cognito authentication

Authenticate with the same Cognito user pool and SRP flow used by the designer without storing an ID token.

When to use

Use username/password authentication for local automation and CI identities allowed to call the generation API.

Behavior

  • The client loads credentials from a local .env file when requested.
  • Cognito USER_SRP_AUTH derives a proof locally; the password is sent only through the Cognito authentication protocol.
  • The temporary ID token is sent unchanged in the generation request Authorization header.
  • An explicit ID token can be supplied when another authentication layer already obtained one.

.env variables properties

Local authentication and endpoint configuration.

PropertyTypeDescription
SERVICE_ARCHITECT_USERNAMEstring

Cognito username.

SERVICE_ARCHITECT_PASSWORDsecret

Cognito password.

SERVICE_ARCHITECT_ID_TOKENoptional secret

Skip SRP when a valid token is already available.

SERVICE_ARCHITECT_API_URLoptional URL

Override the default designer API environment.

.env

SERVICE_ARCHITECT_USERNAME=user@example.com
SERVICE_ARCHITECT_PASSWORD=change-me
SERVICE_ARCHITECT_ID_TOKEN=
SERVICE_ARCHITECT_API_URL=https://0pc6ljy0hg.execute-api.us-east-1.amazonaws.com/test