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
[WFCORE-4750] Using regex for role in Elytron #4017
Conversation
Core - Full Integration Build 9180 outcome was FAILURE using a merge of 7799670 |
Core - Full Integration Build 9180 outcome was FAILURE using a merge of 7799670 |
7799670
to
5810c59
Compare
Core - Full Integration Build 9215 outcome was UNKNOWN using a merge of 5810c59 |
Core - Full Integration Build 9213 outcome was UNKNOWN using a merge of 5810c59 |
5810c59
to
c43be70
Compare
Core - Full Integration Build 9214 outcome was FAILURE using a merge of c43be70 |
Core - Full Integration Build 9216 outcome was FAILURE using a merge of c43be70 |
@@ -427,7 +427,9 @@ | |||
String REFERENCE = "reference"; | |||
String REFERRAL_MODE = "referral-mode"; | |||
String REGISTER_JASPI_FACTORY = "register-jaspi-factory"; | |||
String REGEX = "regex"; |
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.
It might be good to use pattern
as the attribute name instead of regex
to be consistent with other resources that make use of a regular expression.
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.
Fixed. Thanks
@@ -80,6 +85,19 @@ | |||
.setRestartAllServices() | |||
.build(); | |||
|
|||
static final SimpleAttributeDefinition REGEX = new SimpleAttributeDefinitionBuilder(ElytronDescriptionConstants.REGEX, ModelType.STRING, false) |
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.
I think you can use SimpleAttributeDefinitionBuilder(RegexAttributeDefinitions.PATTERN)
here instead and then remove the set
calls below.
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.
Fixed. Thank you
@@ -0,0 +1,148 @@ | |||
package org.wildfly.extension.elytron; |
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.
Missing copyright header.
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.
Fixed.
} | ||
|
||
@Before | ||
public void init() throws Exception { |
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.
Is this method actually needed?
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.
Fixed.
c43be70
to
1016637
Compare
Core - Full Integration Build 9241 outcome was FAILURE using a merge of 1016637 |
Core - Full Integration Build 9243 outcome was FAILURE using a merge of 1016637 |
1016637
to
2507974
Compare
Core - Full Integration Build 9245 outcome was FAILURE using a merge of 2507974 |
Core - Full Integration Build 9247 outcome was FAILURE using a merge of 2507974 |
2507974
to
4ae64b7
Compare
Core - Full Integration Build 9246 outcome was FAILURE using a merge of 4ae64b7 |
Core - Full Integration Build 9248 outcome was FAILURE using a merge of 4ae64b7 |
Thanks, @Skyllarr. This looks good, it just has some conflicts that need to be resolved. |
Core - Full Integration Build 9323 outcome was FAILURE using a merge of c39741f |
Core - Full Integration Build 9327 outcome was FAILURE using a merge of c39741f |
Core - Full Integration Build 9329 outcome was FAILURE using a merge of 4002efe |
Core - Full Integration Build 9325 outcome was FAILURE using a merge of 4002efe |
Core - Full Integration Build 9326 outcome was FAILURE using a merge of 42f28b0 |
Core - Full Integration Build 9330 outcome was FAILURE using a merge of 42f28b0 |
Core - Full Integration Build 9328 outcome was FAILURE using a merge of 3efb194 |
Core - Full Integration Build 9332 outcome was UNKNOWN using a merge of 3efb194 |
Core - Full Integration Build 9329 outcome was FAILURE using a merge of 19dca67 |
Core - Full Integration Build 9333 outcome was FAILURE using a merge of 19dca67 |
Core - Full Integration Build 9452 outcome was FAILURE using a merge of e197ab3 |
Core - Full Integration Build 9449 outcome was FAILURE using a merge of e197ab3 |
Core - Full Integration Build 9582 outcome was FAILURE using a merge of aa94054 |
Core - Full Integration Build 9572 outcome was FAILURE using a merge of aa94054 |
Core - Full Integration Build 9573 outcome was FAILURE using a merge of d80f246 |
Core - Full Integration Build 9583 outcome was FAILURE using a merge of d80f246 |
Core - Full Integration Build 9574 outcome was FAILURE using a merge of c0736ac |
Core - Full Integration Build 9584 outcome was FAILURE using a merge of c0736ac |
|
||
Roles roles = identity.getRoles(); | ||
Assert.assertTrue(roles.contains("admin")); | ||
Assert.assertTrue(roles.contains("admin")); |
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.
Maybe duplicated line here? From test domain definition I ca see that user5
should have the following roles, resulting from AggregateRoleMapper1
processing:
1-user-1
: match, translated intoadmin
joe
: no match, not kept2-guest-2
: match, translated intoguest
Hence looks like result should be {admin, guest}
.
WDYT?
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.
fixed
Core - Full Integration Build 9610 outcome was FAILURE using a merge of 35debf8 |
Core - Full Integration Build 9631 outcome was FAILURE using a merge of 35debf8 |
Core - Full Integration Build 9636 outcome was FAILURE using a merge of a81d981 |
Core - Full Integration Build 9659 outcome was FAILURE using a merge of a81d981 |
Jira: WFCORE-4750
Requires ELY-1909