-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Indicate that max_token_ttl is required for OIDC auth methods #360
Conversation
am-ak
commented
Oct 4, 2023
- Include an example for OIDC auth method
- correct the description of max_token_ttl that it is a required argument for OIDC auth method
- Include an example for OIDC auth method - correct the description of max_token_ttl that it is a required argument for OIDC auth method
docs/resources/acl_auth_method.md
Outdated
Deine an `OIDC` auth method: | ||
```hcl | ||
resource "consul_acl_auth_method" "oidc" { | ||
name = "auth0" | ||
type = "oidc" | ||
max_token_ttl = "5m" | ||
config_json = jsonencode({ | ||
"OIDCDiscoveryURL": "https://<AUTH0_DOMAIN>/", | ||
"OIDCClientID": "<AUTH0_CLIENT_ID>", | ||
"OIDCClientSecret": "<AUTH0_CLIENT_SECRET>", | ||
"BoundAudiences": ["<AUTH0_CLIENT_ID>"], | ||
"AllowedRedirectURIs": [ | ||
"http://localhost:8550/oidc/callback", | ||
"http://localhost:8500/ui/oidc/callback" | ||
], | ||
"ClaimMappings": { | ||
"http://consul.internal/first_name": "first_name", | ||
"http://consul.internal/last_name": "last_name" | ||
}, | ||
"ListClaimMappings": { | ||
"http://consul.internal/groups": "groups" | ||
} | ||
}) | ||
} | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deine an `OIDC` auth method: | |
```hcl | |
resource "consul_acl_auth_method" "oidc" { | |
name = "auth0" | |
type = "oidc" | |
max_token_ttl = "5m" | |
config_json = jsonencode({ | |
"OIDCDiscoveryURL": "https://<AUTH0_DOMAIN>/", | |
"OIDCClientID": "<AUTH0_CLIENT_ID>", | |
"OIDCClientSecret": "<AUTH0_CLIENT_SECRET>", | |
"BoundAudiences": ["<AUTH0_CLIENT_ID>"], | |
"AllowedRedirectURIs": [ | |
"http://localhost:8550/oidc/callback", | |
"http://localhost:8500/ui/oidc/callback" | |
], | |
"ClaimMappings": { | |
"http://consul.internal/first_name": "first_name", | |
"http://consul.internal/last_name": "last_name" | |
}, | |
"ListClaimMappings": { | |
"http://consul.internal/groups": "groups" | |
} | |
}) | |
} | |
``` | |
Define an `OIDC` auth method: | |
```hcl | |
resource "consul_acl_auth_method" "oidc" { | |
name = "auth0" | |
type = "oidc" | |
max_token_ttl = "5m" | |
config_json = jsonencode({ | |
"OIDCDiscoveryURL": "https://<AUTH0_DOMAIN>/", | |
"OIDCClientID": "<AUTH0_CLIENT_ID>", | |
"OIDCClientSecret": "<AUTH0_CLIENT_SECRET>", | |
"BoundAudiences": ["<AUTH0_CLIENT_ID>"], | |
"AllowedRedirectURIs": [ | |
"http://localhost:8550/oidc/callback", | |
"http://localhost:8500/ui/oidc/callback" | |
], | |
"ClaimMappings": { | |
"http://consul.internal/first_name": "first_name", | |
"http://consul.internal/last_name": "last_name" | |
}, | |
"ListClaimMappings": { | |
"http://consul.internal/groups": "groups" | |
} | |
}) | |
} | |
``` | |
Hi @am-ak, thank you very much for reporting this issue. I had missed this when working on I kept most of your implementation but migrated the I also updated the example in the documentation to use the one in the Consul documentation. Thanks for your contribution! |
…orp#360) Co-authored-by: Rémi Lapeyre <[email protected]>