-
Notifications
You must be signed in to change notification settings - Fork 540
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
Add new DefinedBy property to authenticator config. #5938
base: master
Are you sure you want to change the base?
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
c4243a8
to
388b5fa
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
388b5fa
to
02d972c
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
02d972c
to
71e75c3
Compare
PR builder started |
PR builder completed |
9fc695e
to
99f7c76
Compare
99f7c76
to
b40fb77
Compare
PR builder started |
PR builder completed |
038f4a3
to
10bba5c
Compare
10bba5c
to
6ab1997
Compare
@Thisara-Welmilla please refer to the right issue in this PR |
//TODO: Remove warn log, once feature is ready. | ||
if (authenticator.getDefinedByType() == null) { | ||
LOG.warn("The defined by type is not set for the : " + authenticator.getName()); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, IMO this is not a good practice to follow.
We clearly know that this can be null for exisitng authenticators, so we should move to the default which is system
// TODO: Remove warn log, once feature is ready. | ||
if (federatedAuthenticatorConfig.getDefinedByType() == null) { | ||
federatedAuthenticatorConfig.setDefinedByType(IdentityConstants.DefinedByType.SYSTEM); | ||
LOG.warn("The defined by type is not set for the : " + federatedAuthenticatorConfig.getName()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's have a debug log here rather than a warn. Also, let's indicate that 'system' is set by default
* | ||
* @return String[] | ||
*/ | ||
public IdentityConstants.DefinedByType getDefinedByType() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we have this DefinedByType enum defined relative to application authenticator than using IdentityConstants
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We cannot do this, as it cause circular dependency.
|
||
// TODO: Remove warn log, once feature is ready. | ||
for (FederatedAuthenticatorConfig config: federatedAuthenticatorConfigs) { | ||
if (config.getDefinedByType() == null) { | ||
LOG.warn("The defined by type is not set for the : " + config.getName()); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same comment above applies here
PR builder started |
c0c2106
to
a8cea2d
Compare
PR builder completed |
a8cea2d
to
c9166db
Compare
PR builder started |
PR builder completed |
97b3f3c
to
15ac2d0
Compare
15ac2d0
to
e01bdfa
Compare
PR builder started |
e01bdfa
to
a8f8170
Compare
PR builder started |
PR builder completed |
PR builder completed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving the pull request based on the successful pr build https://github.com/wso2/product-is/actions/runs/11064117139
Issue:
With this PR following changes are added.