Skip to content
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

[v15] Entra ID integration #42555

Merged
merged 8 commits into from
Jun 7, 2024
Merged

[v15] Entra ID integration #42555

merged 8 commits into from
Jun 7, 2024

Conversation

justinas
Copy link
Contributor

@justinas justinas commented Jun 6, 2024

Backports Entra ID integration to v15 in bulk. Enterprise counterpart: https://github.com/gravitational/teleport.e/pull/4340

NB: I added e561e8c to solve issues with go.mod in integrations/event-handler and integrations/terraform.

changelog: Added support for Microsoft Entra ID directory synchronization (Teleport Enterprise only, preview)

justinas and others added 8 commits June 6, 2024 16:36
* Add Entra ID resource origin

* Ignore ID and Revision from `header` in cmp

* Add e_imports for MS Graph SDK
* Add e imports for MS Graph SDK

* Add ability to sign Entra ID OIDC JWTs, rework KID handling

- Synthesize Key IDs for our JWT keys. For backwards compatibility, also
  include the same keys with an empty `kid` in JWKS.
- Sign AWS OIDC tokens with a `kid=""` header claim,
  rather than omitting the `kid` claim altogether.
  See comment for details.

* Add validation for Entra ID plugin

* Fix typo in assertion function name

* Update the OIDC JWKS test to expect the same key twice

* Add Entra ID plugin type constant

* go mod tidy

* Fix expected JWKS size in integration test

* Add basic tests for KeyID

* Move Azure auth settings from Plugin to Integration

* Address review comments

* Add a unit test to ensure KeyID compatibility

* Add license header to token_generator.go

* Rename validation function per new conventions
* Add AWSSAMLProviderV1 to access graph proto

* Access Graph: sync AWS SAML Providers

* Parse SAML entity descriptor before sending to TAG

* Add protos for AWS OIDC providers

* Fetch AWS OIDC providers

* Fetch signing certificates for AWS SAML providers

* Deflake identity provider fetch test

The concrete implementation of IAM mock uses a map,
resulting in non-deterministic iteration order.
Sort the results before comparing to alleviate.

* Update lib/srv/discovery/fetchers/aws-sync/iam_test.go

Co-authored-by: Jakub Nyckowski <jakub.nyckowski@goteleport.com>

---------

Co-authored-by: Jakub Nyckowski <jakub.nyckowski@goteleport.com>
* Add access graph settings to Entra ID plugin

* Move Entra ID labels to OSS

* Add Entra resources and RPC to Access Graph proto

* Add azure-oidc integration to web.

Current code assumes that Integration is always either AwsOidc,
or an external audit storage integration

* Change app sso cache to a repeated field
* Add Entra ID integration onboarding script

* Adapt after proto update

* Validate names in azure script handler, add test

* Add license headers

* Update Entra plugin test with SSO connector field

* Fix lint

* Remove leftover panics

* Adjust success message

* Downgrade log message level

* Expect exactly 1 SP for MS Graph, improve errors

* Properly extract hostname for enterprise app name

* Comment on assuming the first subscription

* Address review nits

* Factor out sso info fetch into a function

* fixup refactor

* Add retry logic to app role assignment

* Make godoc conventional
…rerequisites (#42172)

* Remove integration name validation from web script

Not used by the script. It is validated by the "plugins/validate"
endpoint.

* Add required frontend constants for Entra ID

* Support Azure/Entra integrations in the list

* Add IsPolicyEnabled to web config

* Allow custom URL for ButtonLockedFeature

* Add CTA_ENTRA_ID event type

* Expose TAGInfoCache for use in e

* Add LackingIgs option

* Add Entra ID icon

* Add Entra ID plugin to storybook

* Bump e for dev build

* Return underlying error in getPrivateAPIToken

* Find default Azure subscription instead of the first one

* Require user to re-login when provisioning Azure OIDC

* Update prehog protos with Entra ID values

From https://github.com/gravitational/cloud/pull/9111

* Suppress verbose warnings / information from az

* Add an additional message after successful auth

Lets user know that `az login` has completed
and `teleport` is continuing its work.

* Move EntraId constant to the bottom

* Revert unintended changes to usageevents

CTA is 1-to-1 with prehog, but IntegrationEnrollKind is not.

* Remove integrationName validation asserts from test

This parameter is no longer accepted by the endpoint

* Revert "Bump e for dev build"

This reverts commit fc747a0.
@justinas justinas marked this pull request as ready for review June 6, 2024 19:28
@justinas justinas requested review from jakule and r0mant June 6, 2024 19:28
Copy link

github-actions bot commented Jun 6, 2024

The PR changelog entry failed validation: Changelog entry not found in the PR body. Please add a "no-changelog" label to the PR, or changelog lines starting with changelog: followed by the changelog entries for the PR.

@public-teleport-github-review-bot

@justinas - this PR will require admin approval to merge due to its size. Consider breaking it up into a series smaller changes.

@justinas justinas requested a review from tigrato June 6, 2024 19:31
@public-teleport-github-review-bot public-teleport-github-review-bot bot removed the request for review from tigrato June 6, 2024 20:09
@justinas justinas added this pull request to the merge queue Jun 7, 2024
Merged via the queue into branch/v15 with commit bb5706e Jun 7, 2024
43 of 44 checks passed
@justinas justinas deleted the justinas/v15/entra-id branch June 7, 2024 08:52
This was referenced Jun 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants