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

refactor(auth): remove legacy auth & ADFS support #1150

Merged
merged 1 commit into from
Sep 18, 2024

Conversation

BugGambit
Copy link
Contributor

@BugGambit BugGambit commented Sep 17, 2024

As part of the v10 release we would like to remove legacy auth (the API is gone so legacy auth doesn't work) and ADFS support. ADFS is only used by Aramco and Cntxt and we would rather transition them to CogIdP.

Jira:

@BugGambit BugGambit requested a review from a team as a code owner September 17, 2024 19:38
@BugGambit BugGambit force-pushed the f1/remove_legacy_auth_adfs branch 2 times, most recently from 65668a8 to b79184e Compare September 17, 2024 19:56
if (isBrowser() && !isUsingSSL() && !options.noAuthMode) {
console.warn(
'You should use SSL (https) when you login with OAuth since CDF only allows redirecting back to an HTTPS site'
);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Wouldn't this warning be logged even if we're not using legacy auth?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, but it was placed there due to legacy auth. No reason to restrict to https anymore.
The https restriction came from legacy auth.

Comment on lines +78 to +84
if (!options) {
throw Error('`CogniteClient` is missing parameter `options`');
}

if (!isString(options.appId)) {
throw Error('options.appId is required and must be of type string');
}

if (!isString(options.project)) {
throw Error('options.project is required and must be of type string');
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Feels like we can still use verifyOptionsRequiredFields in some form to manage this easier - but i'm also not sure how many new "required" things we would be adding to options.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The verifyOptionsRequiredFields did a bit more and mostly related to auth options.
Keeping this as required for now as it's aligned with version 9.

Copy link
Contributor

@cemreyavuz cemreyavuz left a comment

Choose a reason for hiding this comment

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

LGTM btw, comments are not blockers

@BugGambit BugGambit merged commit e7cd2c3 into release-v10 Sep 18, 2024
8 checks passed
@BugGambit BugGambit deleted the f1/remove_legacy_auth_adfs branch September 18, 2024 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants