Just posted this issue. Not sure if this has bit a...
# troubleshoot
d
Just posted this issue. Not sure if this has bit anyone else: https://github.com/datahub-project/datahub/issues/7107
b
Thanks for raising the ticket. Going to respond directly on there
w
@thankful-morning-85093 does this relate to your problem?
t
this seems to be different. I am not able to ingest Azure SAML gorups
d
@brainy-tent-14503 I think `datahub-helm`'s latest gh-pages release has the wrong
datahub-frontend
version listed for the
0.2.139
chart
this should be
0.2.132
not
0.2.131
b
Think there was a merge conflict, bumping versions should resolve it here.
d
nice
thanks
b
This issue is still open, it was not resolved by setting the AUTH_OIDC_SCOPE to “openid profile” (removing “email”)
I suspect the issue has something to do with Datahub. Not just that env var
b
Same issue?
b
Yes
b
So you're getting redirected to an error screen is my guess right?
b
IMG_4659.png
b
Yep okay... and the logs for datahub-frontend pod are giving any hints?
b
Let me check!
d
Copy code
│ Caused by: java.lang.RuntimeException: Failed to resolve user name claim from profile provided by Identity Provider. Missing attribute. Attribute: 'email', Regex: '(.*)', Profile: {sub=2QrOwEUELuLJYrqBrZw77hy │
│     at auth.sso.oidc.OidcCallbackLogic.extractUserNameOrThrow(OidcCallbackLogic.java:173)                                                                                                                        │
│     at auth.sso.oidc.OidcCallbackLogic.handleOidcCallback(OidcCallbackLogic.java:121)                                                                                                                            │
│     at auth.sso.oidc.OidcCallbackLogic.perform(OidcCallbackLogic.java:107)                                                                                                                                       │
│     at controllers.SsoCallbackController$SsoCallbackLogic.perform(SsoCallbackController.java:86)                                                                                                                 │
│     at controllers.SsoCallbackController$SsoCallbackLogic.perform(SsoCallbackController.java:72)                                                                                                                 │
│     at org.pac4j.play.CallbackController.lambda$callback$0(CallbackController.java:54)                                                                                                                           │
│     at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)                                                                                                             │
│     ... 8 common frames omitted                                                                                                                                                                                  │
│ 2023-01-25 22:44:54,329 [application-akka.actor.default-dispatcher-10] ERROR controllers.SsoCallbackController - Caught exception while attempting to handle SSO callback! It's likely that SSO integration is m │
│ java.util.concurrent.CompletionException: java.lang.RuntimeException: Failed to resolve user name claim from profile provided by Identity Provider. Missing attribute. Attribute: 'email', Regex: '(.*)', Profil │
│     at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:314)                                                                                                              │
│     at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:319)                                                                                                            │
│     at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1702)                                                                                                             │
│     at play.core.j.HttpExecutionContext.$anonfun$execute$1(HttpExecutionContext.scala:64)                                                                                                                        │
│     at akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:49)                                                                                                                                             │
│     at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(ForkJoinExecutorConfigurator.scala:48)                                                                                                   │
│     at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)                                                                                                                                 │
│     at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)                                                                                                                │
│     at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)                                                                                                                                  │
│     at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)                                                                                                                             │
│     at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)                                                                                                                    │
│ Caused by: java.lang.RuntimeException: Failed to resolve user name claim from profile provided by Identity Provider. Missing attribute. Attribute: 'email', Regex: '(.*)', Profile: {sub=2QrOwEUELuLJYrqBrZw77hy │
│     at auth.sso.oidc.OidcCallbackLogic.extractUserNameOrThrow(OidcCallbackLogic.java:173)                                                                                                                        │
│     at auth.sso.oidc.OidcCallbackLogic.handleOidcCallback(OidcCallbackLogic.java:121)                                                                                                                            │
│     at auth.sso.oidc.OidcCallbackLogic.perform(OidcCallbackLogic.java:107)                                                                                                                                       │
│     at controllers.SsoCallbackController$SsoCallbackLogic.perform(SsoCallbackController.java:86)                                                                                                                 │
│     at controllers.SsoCallbackController$SsoCallbackLogic.perform(SsoCallbackController.java:72)                                                                                                                 │
│     at org.pac4j.play.CallbackController.lambda$callback$0(CallbackController.java:54)                                                                                                                           │
│     at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)
b
okay yep nice
so let me look i do have one suggestion most liikely
ah yes i see it
the default claim we use for extracting dh usernames is indeed email
try setting thing
this
Copy code
AUTH_OIDC_USER_NAME_CLAIM=upn
on datahub-frontend
If you are using helm, you can place this inside the extraEnvs block
d
can i guess?
Copy code
extraEnvs:
    - name: AUTH_OIDC_USER_NAME_CLAIM
      value: name
b
yes this is the one.. on datahub-frontend
d
🔔 ding ding
lol ok i'll try
b
no prize
today
lol
d
i just searched that error message and found https://github.com/datahub-project/datahub/issues/6958
and saw someone commented on it
b
okay let me document this really quick
because came up a few times
d
should i change the
AUTH_OIDC_SCOPE
back to
openid profile email
?
b
no its fine
d
ok
b
what you have is ok
d
wait,
name
or
upn
b
it actually depends on what claim your Idp returns
i think you mentioned some notion of UPN above
d
yeah i think for Azure it's
upn
name
didn't work. trying
upn
b
ok cool
d
failed
b
same thing?
Do you need to add upn to scope to fetch it? Let me check Azure docs
d
Copy code
│ 2023-01-25 23:47:39,404 [application-akka.actor.default-dispatcher-10] WARN  p.api.mvc.LegacySessionCookieBaker - Cookie failed message authentication check                                                     │
│ 2023-01-25 23:47:40,296 [application-akka.actor.default-dispatcher-13] WARN  p.api.mvc.LegacySessionCookieBaker - Cookie failed message authentication check                                                     │
│ 2023-01-25 23:47:43,276 [application-akka.actor.default-dispatcher-8] WARN  o.p.o.profile.creator.TokenValidator - Preferred JWS algorithm: null not available. Using all metadata algorithms: [RS256]           │
│ 2023-01-25 23:47:43,905 [application-akka.actor.default-dispatcher-8] ERROR controllers.SsoCallbackController - Caught exception while attempting to handle SSO callback! It's likely that SSO integration is mi │
│ java.util.concurrent.CompletionException: java.lang.RuntimeException: Failed to resolve user name claim from profile provided by Identity Provider. Missing attribute. Attribute: 'upn', Regex: '(.*)', Profile: │
│     at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:314)                                                                                                              │
│     at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:319)                                                                                                            │
│     at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1702)                                                                                                             │
│     at play.core.j.HttpExecutionContext.$anonfun$execute$1(HttpExecutionContext.scala:64)                                                                                                                        │
│     at akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:49)                                                                                                                                             │
│     at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(ForkJoinExecutorConfigurator.scala:48)                                                                                                   │
│     at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)                                                                                                                                 │
│     at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)                                                                                                                │
│     at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)                                                                                                                                  │
│     at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)                                                                                                                             │
│     at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)                                                                                                                    │
│ Caused by: java.lang.RuntimeException: Failed to resolve user name claim from profile provided by Identity Provider. Missing attribute. Attribute: 'upn', Regex: '(.*)', Profile: {sub=S-I9kPUZp16MYo1HUMaNq5tk0 │
│     at auth.sso.oidc.OidcCallbackLogic.extractUserNameOrThrow(OidcCallbackLogic.java:173)                                                                                                                        │
│     at auth.sso.oidc.OidcCallbackLogic.handleOidcCallback(OidcCallbackLogic.java:121)                                                                                                                            │
│     at auth.sso.oidc.OidcCallbackLogic.perform(OidcCallbackLogic.java:107)                                                                                                                                       │
│     at controllers.SsoCallbackController$SsoCallbackLogic.perform(SsoCallbackController.java:86)                                                                                                                 │
│     at controllers.SsoCallbackController$SsoCallbackLogic.perform(SsoCallbackController.java:72)                                                                                                                 │
│     at org.pac4j.play.CallbackController.lambda$callback$0(CallbackController.java:54)                                                                                                                           │
│     at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)                                                                                                             │
│     ... 8 common frames omitted
b
yeah Azure isn't sending it 😕
can you try this? : preferred_username
d
isn't that the default
b
actually email was getting picked up^
d
according to DataHub docs
hm
right
b
im changing docs rn
to reflect latest
d
~4 minutes to apply
it worked!
@big-carpet-38439 can I give you a support prize
🌮
b
Hahaha thank you!!
And we got something additional out of this one! https://github.com/datahub-project/datahub/pull/7141
Thanks for helping call out these issues
d
np! more to come I'm sure 😉
I hope to contribute some of my own PRs eventually
I guess I will have to set up my own Helm repo for that?
b
Absolutely.. We'll be here to support you... No Helm repo for that! Feel free to take a personal fork off of datahub main repo and then raise PRs from there 🙂 Unless of course you want to contribute to Helm charts specifically
d
i mean to deploy my own version
b
To deploy DataHub I think you can just use the off the shelf charts
Unless you wanna do something pretty custom
d
got it
a
hi all, may i know who encountered sso issue via okta provider? thanks in advance