<#6549 [Docs] EntraID setup for flyte-binary> Issu...
# flyte-github
c
#6549 [Docs] EntraID setup for flyte-binary Issue created by mys007 ### Description Hi, I have invested the last 3 full working days to set up Microsoft Entra ID for authentication and authorization. Unfortunately, it has been a very painful process full of trial and error, there are many gotchas on the way hidden in the code and the official documentation has been of only a limited help and sometimes more confusing than helpful. I want to share with the public the exact setup so that others may benefit from it. It would be terrific if this eventually gets into the documentation after some review. ### App registration on Entra ID Unlike for Okta, which requires 3 independent app registrations, there is only one necessary for Entra ID. You need to know: •
<deployment-url>
, with TLS ingress enabled (self-signed certificate is enough). Perform these steps: • Register a new App, it can be called as you wish. • In "Authentication", make sure that the redirect URL is
https://<deployment-url>/callback
for Platform type Web and
http://localhost:53593/callback
for Platform type Mobile and desktop applications. In Settings tab, activate "Allow public client flows". • In "Certificates & secrets", generate a secret. • In "Token configuration", add "email" optional claim for both ID and Access (though this is not probably necessary) • In "API permissions", add "email", "offline_access", "openid", "profile", "User.Read" • In "Expose as API", define Application ID URI as
api://<client_id>
and add a new scope
api://<client_id>/all
(Admins-only consent). Authorize
<client-id>
for this scope. In the end, you'll get these following things out of it: •
<tenant-id>
("Directory (tenant) ID") •
<client-id>
("Application (client) ID") •
<client-secret>
In addition, you need to get via
python -c 'import bcrypt; import base64; print(base64.b64encode(bcrypt.hashpw("<client-secret>".encode("utf-8"), bcrypt.gensalt(6))))'
### Deployment configuration (values.yaml) This comes close to https://www.union.ai/docs/flyte/deployment/flyte-configuration/configuring-authentication/#flyte-core-with-entra-id but not quite exactly.
Copy code
auth:
            enabled: true
            oidc:
              baseUrl: "https://login.microsoftonline.com/<tenant-id>/v2.0"
              clientId: <client-id>
              clientSecret: <client-secret>
            internal:
              clientId: <client-id>
              clientSecret: <client-secret>
              clientSecretHash: <client-secret-hash>
            authorizedUris:
            - <deployment-url>
          inline:
            auth:
              appAuth:
                authServerType: External
                externalAuthServer:
                  baseUrl: "https://login.microsoftonline.com/<tenant-id>/v2.0"
                  metadataUrl: .well-known/openid-configuration
                  AllowedAudience:
                  - api://<client-id>
                thirdPartyConfig:
                  flyteClient:
                    clientId: <client-id>
                    audience: api://<client-id>
                    redirectUri: http://localhost:53593/callback
                    scopes:
                    - api://<client-id>/.default
              userAuth:
                openId:
                  baseUrl: "https://login.microsoftonline.com/<tenant-id>/v2.0"
                  scopes:
                  - profile
                  - openid
                  - offline_access
                  clientId: <client-id>
### Are you sure this issue hasn't been raised already? • Yes ### Have you read the Code of Conduct? • Yes flyteorg/flyte