chalice icon indicating copy to clipboard operation
chalice copied to clipboard

Missing token validation property from custom authorizer

Open abdullah353 opened this issue 8 years ago • 2 comments

I have setup my custom authorizer using Auth0 and i have to adjust Token Validation parameter to ^Bearer [-0-9a-zA-z\.]*$. Currently the system doesn't utilizing the identityValidationExpression which results in empty Token Validation after each chalice deploy.

E.g: I have created following authorizer from aws console:

screen shot 2017-12-20 at 4 24 17 pm

After running chalice deploy my custom Token Authorization get vanished: screen shot 2017-12-20 at 4 12 43 pm

My code for Custom Verification was:

auth0 = CustomAuthorizer(
    name='jwt-rsa-custom-authorizer',
    header='Authorization',
    ttl_seconds=3600,
    authorizer_uri=('uri' )
)

abdullah353 avatar Dec 20 '17 11:12 abdullah353

A quick fix in above merge request will allow users to set Token Validation as following:

auth0 = CustomAuthorizer(
    name='jwt-rsa-custom-authorizer',
    header='Authorization',
    ttl_seconds=3600,
    token_validation='^Bearer [-0-9a-zA-z\.]*$',
    authorizer_uri=('uri' )
)

@jamesls can you review it ?

abdullah353 avatar Dec 20 '17 12:12 abdullah353

Thanks for the pull request. Marking this as an enhancement.

joguSD avatar Dec 20 '17 18:12 joguSD