Skip to content

Instantly share code, notes, and snippets.

@paxti
Last active April 29, 2017 04:12
Show Gist options
  • Save paxti/d0b09ed79b08eb709e54e8c7958269a6 to your computer and use it in GitHub Desktop.
Save paxti/d0b09ed79b08eb709e54e8c7958269a6 to your computer and use it in GitHub Desktop.
Auth0 rule necessary for SAML integration (addon) for AWS
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