Hi,
We are experiencing an issue, but only in one of Auth0/AWS implementations.
We have 2 separate Auth0 accounts and 2 separate clients. (one is basically a test account that was set up for a dev environment).
Oddly, in our dev environment, our AWS delegation works perfectly and no errors are returned. However, in our main environment, it seems that the below function which calls Auth0’s getDelegationToken() method to return AWS credentials, is returning the error: ‘Missing principal parameter’
function getAWSDelegationToken() {
var auth0 = new Auth0({
clientID: bcc.config.auth.id,
domain: bcc.config.auth.domain,
callbackURL: ''
});
var options = {
id_token: bcc.config.api.token,
api: 'aws',
role: bcc.config.aws.iam_role_arn,
principal: bcc.config.aws.iam_provider_arn
};
auth0.getDelegationToken(options, function(err,delegationResult) {
if (!err){
// AWS credentials located in delegationResult.Credentials
bcc.trigger(bcc.events.AWS_CREDENTIALS_READY, {delegationResult: delegationResult});
} else {
console.log(err);
}
});
}
You can see that ‘principal’ is being assigned to the ‘options’ Object (and in this case set to a global config variable) - but I have confirmed that it does point to an AWS IAM Provider ARN.
I am loading the following version of Auth0 into my JS:
https://cdn.auth0.com/w2/auth0-7.6.1.min.js
Please let me know if there’s any other information you might need and thanks for any help you are able to provide !
-Mikey