Last active
April 29, 2017 04:12
-
-
Save paxti/d0b09ed79b08eb709e54e8c7958269a6 to your computer and use it in GitHub Desktop.
Auth0 rule necessary for SAML integration (addon) for AWS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function (user, context, callback) { | |
if (context.clientID === 'CLIENT_ID' && context.protocol === 'delegation') { | |
// set AWS settings | |
context.addonConfiguration = context.addonConfiguration || {}; | |
context.addonConfiguration.aws = context.addonConfiguration.aws || {}; | |
context.addonConfiguration.aws.principal = 'arn:aws:iam::...'; // Identity Provider ARN | |
context.addonConfiguration.aws.role = 'arn:aws:iam::...'; // Role ARN | |
} | |
callback(null, user, context); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment