Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Get temporary AWS credentials from OAuth token

License

Notifications You must be signed in to change notification settings

zalando-stups/aws-credentials-service

Repository files navigation

AWS Credentials Service (deprecated)

OpenTracing enabled

This very simple service takes an OAuth Bearer token, checks the user's groups, and returns temporary AWS credentials for the given account and role.

$ docker build -t aws-credentials-service .
$ docker run -it -p 8080:8080 \
  -e TOKENINFO_URL=https://tokeninfo.example.org/oauth2/tokeninfo \
  -e GROUPS_URL='https://groups.example.org/employees/{uid}/groups' \
  aws-credentials-service

Swagger UI is now available on http://localhost:8080/ui/

Configuration

The following environment variables are supported:

TOKENINFO_URL
URL of OAuth tokeninfo endpoint, see tokeninfo mock and Plan B Token Info documentation
OAUTH2_ACCESS_TOKEN_URL
URL of OAuth Token Endpoint
GROUPS_URL
URL to get list of user's groups
ROLE_ARN
Optional: template for AWS role ARN to assume (defaults to arn:aws:iam::{account_id}:role/{role_name})
OPENTRACING_TRACER
Optional: OpenTracing tracer name as supported by opentracing-utils. Extra environment variables might be needed depending on the OpenTracing tracer used. Defaults to NOOP tracer.

The GROUPS_URL needs to return a JSON structure like:

[
{"role": "PowerUser", "id": "123456789012", "name": "myacc"},
{"role": "ReadOnly", "id": "456456789012", "name": "foobar"}
]

About

Get temporary AWS credentials from OAuth token

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published