mirror of
https://github.com/pomerium/pomerium.git
synced 2025-08-03 16:59:22 +02:00
internal/sessions: handle claims "ver" field generally (#990)
"ver" field is not specified by RFC 7519, so in practice, most providers return it as string, but okta returns it as number, which cause okta authenticate broken. To fix it, we handle "ver" field more generally, to allow both string and number in json payload.
This commit is contained in:
parent
1e3c381e1e
commit
505ff5cc5c
4 changed files with 62 additions and 4 deletions
|
@ -48,10 +48,10 @@ func (a *Authorize) Check(ctx context.Context, in *envoy_service_auth_v2.CheckRe
|
|||
// only accept sessions whose databroker server versions match
|
||||
if sessionState != nil {
|
||||
a.dataBrokerDataLock.RLock()
|
||||
if a.dataBrokerSessionServerVersion != sessionState.Version {
|
||||
if a.dataBrokerSessionServerVersion != sessionState.Version.String() {
|
||||
log.Warn().
|
||||
Str("server_version", a.dataBrokerSessionServerVersion).
|
||||
Str("session_version", sessionState.Version).
|
||||
Str("session_version", sessionState.Version.String()).
|
||||
Msg("clearing session due to invalid version")
|
||||
sessionState = nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue