Skip to content

Commit

Permalink
[entraid] add field to support system credentials instead of OIDC
Browse files Browse the repository at this point in the history
This PR introduces two new fields for Entra Plugins' settings:

- `tenant_id`: Is the Directory to sync
- `use_system_credentials`: defaults to system credentials instead of using OIDC to authenticate to Entra ID

Both these fields are required for clusters whose access is private and can't be reached from the internet. For those cases, Azure can't validate the OIDC token Teleport shares.

Signed-off-by: Tiago Silva <[email protected]>
  • Loading branch information
tigrato committed Oct 23, 2024
1 parent 0437596 commit 0c931bd
Show file tree
Hide file tree
Showing 3 changed files with 1,910 additions and 1,807 deletions.
9 changes: 8 additions & 1 deletion api/proto/teleport/legacy/types/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6451,8 +6451,15 @@ message PluginEntraIDSyncSettings {
// DefaultOwners are the default owners for all imported access lists.
repeated string default_owners = 1;

// SSOConnectorID is the name of the Teleport SSO connector created and used by the Entra ID plugin
// SSOConnectorID is the name of the Teleport SSO connector created and used by the Entra ID plugin.
string sso_connector_id = 2;

// use_system_credentials uses the system available credentials instead of using the OIDC flow to authenticate
// to Azure EntraId. This is important for clusters that are not available through internet.
bool use_system_credentials = 3;

// tenant_id is the Azure Directory this plugin syncs.
string tenant_id = 4;
}

// AccessGraphSettings controls settings for syncing access graph specific data.
Expand Down
7 changes: 7 additions & 0 deletions api/types/plugin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -899,6 +899,13 @@ func TestPluginEntraIDValidation(t *testing.T) {
},
assertErr: requireNamedBadParameterError("sync_settings.sso_connector_id"),
},
{
name: "use system credentials",
mutateSettings: func(s *PluginSpecV1_EntraId) {
s.EntraId.SyncSettings.UseSystemCredentials = true
},
assertErr: require.NoError,
},
}

for _, tc := range testCases {
Expand Down
Loading

0 comments on commit 0c931bd

Please sign in to comment.