Closed vamshiengineer closed 4 years ago
Seeing one error in ssl error log. [oauth2:error] [pid 18620:tid 140443699689216] [client xxxx:xxx] _oauth2_jose_jwt_validate_iat: "iat" validation failure (1605173636): JWT was issued more than 60 seconds ago
you'll need to add verify.iat=skip
to the options for OAuth2TokenVerify
Thanks for quick reply. I set verify.iat.slack_before=60 and made sure that JWT access token was issued less than a minute ago. Resource access is allowed.
depending on the version that you use, use either Require claim sub <value>
or Require oauth2_claim sub <value>
Hi, I am using the version mod_oauth2-3.1.0-1.el7.x86_64.rpm.
Require claim sub user1 => It worked for both users user1 and user2. Require oauth2_claim sub user1 => Apache did not start.
Is there anything missed?
Thanks, Vamshi
you're on a version that does not support oauth2_claim
(but claim
)
Okay. I tried setting Require claim sub user1 & Require claim sub "user1" It did not work as per the configuration. It allowed JWT access tokens with sub having user1 and user2.
that's what it is supposed to do... user3 should not have access then
I mean, its allowing access to resource with JWT access token having either user1 or user2. It should allow only user1 as per configuration.
We do not see any debug logs on this module.
you'll need to set LogLevel oauth2:debug
Hi,
Restriction of access based on claim value:
a. My configuration had both 'Require valid-user' followed by 'Require claim sub
LogLevel debug is already set at global level. With this, openidc module is logging debug messages. oauth2 module is NOT. Tried setting LogLevel oauth2:debug also. Debug logs are not written for oauth2 module.
Thanks, Vamshi
How to set Require claim claim_name:claim_value when claim has multiple values. E.g., Claim scope has multiple valiues like scope : "admin employee"
I want to restrict access for only admins. Require claim scope:admin did NOT work. Can you help with this configuration.
Thanks, Vamshi
it is not possible to match on a substring, if scope is returned as a JSON array you can match on an array elelement
Ok. Thanks for your support.
Hi,
Configuration: <Location /example/oauth20> AuthType oauth2 Require valid-user
OAuth2TokenVerify introspect https://xyz.com/introspect introspect.ssl_verify=false&introspect.auth=client_secret_post&client_id=clientid&client_secret=xxxxx= OAuth2TokenVerify jwks_uri https://xyz.com/jwks jwks_uri.ssl_verify=false
OAuth2AcceptTokenIn environment name=OIDC_access_token
OAuth2AcceptTokenIn query name=access_token
Your help is highly appreciated.