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

Okta: Backend/type changes for Okta Integration enrolment improvements #51731

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kiosion
Copy link
Contributor

@kiosion kiosion commented Jan 31, 2025

Add types and update integration status page + enrol paths for Okta Integration enrolment changes. Required for #5994.

@kiosion kiosion added the no-changelog Indicates that a PR does not require a changelog entry label Jan 31, 2025
@kiosion kiosion force-pushed the maxim/new-okta-setup branch 4 times, most recently from c1d9dea to c34e938 Compare February 4, 2025 03:48
@kiosion kiosion force-pushed the maxim/new-okta-setup branch from c34e938 to f2b7a4e Compare February 4, 2025 15:49
@kiosion kiosion marked this pull request as ready for review February 4, 2025 16:07
@@ -32,6 +32,8 @@ import (
const (
// OIDCJWKWURI is the relative path where the OIDC IdP JWKS is located
OIDCJWKWURI = "/.well-known/jwks-oidc"
// OktaJWKSURI is the relative path where the Okta JWKS is located
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol, is OIDCJWKWURI is a typo? (has a W instead of a S)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like it, I just didn't want to increase the scope of this Okta work further by updating it

Comment on lines +197 to +202
[key: string]: any;
};

export type PluginNameToDetails = {
okta: PluginStatusOkta;
[key: string]: any;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need the [key: string]: any;?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added these for using w/ some pluginsService funcs, so specifying one of those names will result in the return being properly typed... Since the default for the Plugin type's Spec/Status fields with no generics provided is any I figured I'd just keep that the same. Could remove it though and be a bit stricter.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 on removing here and above unless absolutely necessary.

@@ -32,6 +32,8 @@ import (
const (
// OIDCJWKWURI is the relative path where the OIDC IdP JWKS is located
OIDCJWKWURI = "/.well-known/jwks-oidc"
// OktaJWKSURI is the relative path where the Okta JWKS is located
OktaJWKSURI = "/.well-known/jwks-okta"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: spell out what the URI refers to

Suggested change
OktaJWKSURI = "/.well-known/jwks-okta"
OktaJWKSWellknownURI = "/.well-known/jwks-okta"

getIntegrationStatusRoute(
type: PluginKind | IntegrationKind,
name: string,
page?: string
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: from the PR description, I think we are referring to status page here correct?

Suggested change
page?: string
statusPage?: string

| PluginDatadogSpec
| PluginEmailSpec
| PluginMsTeamsSpec;
export type PluginNameToSpec = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: JSDoc

[key: string]: any;
};

export type PluginNameToDetails = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: JSDoc

Comment on lines +197 to +202
[key: string]: any;
};

export type PluginNameToDetails = {
okta: PluginStatusOkta;
[key: string]: any;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 on removing here and above unless absolutely necessary.

credentialsInfo?: CredentialsInfo;
};

export type CredentialsInfo = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can all fields be true at the same time?

JSDoc please.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-changelog Indicates that a PR does not require a changelog entry size/sm ui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants