This commit is contained in:
siacomuzzi 2014-02-14 20:38:25 -03:00
Родитель 770ad4ceaa
Коммит 664f30b658
3 изменённых файлов: 40 добавлений и 2 удалений

Просмотреть файл

@ -9,7 +9,7 @@ Auth0 ships with AWS IAM integration out of the box that allows you to:
It's straight forward to configure Auth0 for federation with AWS using SAML.
1. Add a new App in Auth0 of type __SAML__
1. Add a new App in Auth0 of type __SAML__
2. Use the `https://signin.aws.amazon.com/saml` for the __Application Callback URL__
3. Use this default __SAML configuration__:

37
docs/awsapi-tutorial.md Normal file
Просмотреть файл

@ -0,0 +1,37 @@
# Using Auth0 in AWS APIs
Auth0 can interact with __AWS STS__ directly, and obtain an __AWS token__ that can be used to call any AWS API.
When a user authenticates with Auth0 you will get back an `id_token` (a [JWT](jwt)). You would then use this `id_token` to request Auth0 and AWS Token using the delegation endpoint:
POST https://@@account.namespace@@/delegation
grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer
&id_token=`THE_ID_TOKEN_OF_LOGGED_IN_USER`
&client_id=`THE_CLIENT_ID_OF_CALLER`
&target=@@account.clientId@@
&role=`THE_ROLE_ARN`
&principal=`THE_PRINCIPAL_ARN`
* __Role:__ The Amazon Resource Name (ARN) of the role that the caller will assume.
* __Principal:__ The Amazon Resource Name (ARN) of the SAML provider in AWS IAM that describes the IdP.
The Response will contain the AWS Token:
```
{
Credentials: {
SessionToken: 'AQoDYXdzENf//////...Pz02lt4FSCY6L+WBQ==',
SecretAccessKey: 'zYaN30nMf/9uV....Zx9Em7xQzcCc9/PPl',
Expiration: Fri Jan 10 2014 11:22:32 GMT-0300 (ART),
AccessKeyId: 'ASIAI5PCTTOC6APKKXLQ'
}
}
```
> The Auth0 client libraries simplify calling these endpoint. Check [our GitHub repo](https://github.com/auth0/) for the latest SDKs. Here's [one for client side JavaScript](https://github.com/auth0/auth0.js#delegation-token-request).
## How it works / Samples
You can find more details about how to obtain AWS Tokens to securely call AWS APIs and resources [here](/aws#2).

Просмотреть файл

@ -54,7 +54,8 @@
{ "title": "Node.js API", "url": "/nodeapi-tutorial" },
{ "title": "Ruby API", "url": "/rubyapi-tutorial" },
{ "title": "PHP API", "url": "/phpapi-tutorial" },
{ "title": ".NET WCF", "url": "/wcf-tutorial" }
{ "title": ".NET WCF", "url": "/wcf-tutorial" },
{ "title": "AWS", "url": "/awsapi-tutorial" }
]
},
{