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

[WFCORE-4750] Using regex for role in Elytron #4017

Merged
merged 1 commit into from May 17, 2020

Conversation

Skyllarr
Copy link
Contributor

Jira: WFCORE-4750

Requires ELY-1909

@wildfly-ci
Copy link

Core - Full Integration Build 9180 outcome was FAILURE using a merge of 7799670
Summary: Compilation error: Compiler (new) Build time: 00:01:45

@wildfly-ci
Copy link

Core - Full Integration Build 9180 outcome was FAILURE using a merge of 7799670
Summary: Compilation error: Compiler (new) Build time: 00:01:52

@darranl darranl added Feature This PR adds a new feature to WildFly missing-reqs This PR is missing external requirements before it can be merged labels Nov 20, 2019
@wildfly-ci
Copy link

Core - Full Integration Build 9215 outcome was UNKNOWN using a merge of 5810c59
Summary: Canceled (Error while applying patch; cannot find commit 2afc90c in the https://github.com/wildfly/wildfly-core.git repository, possible reason: refs/pull/4017/merge branch was updated and the commit selected for the ... Build time: 00:00:11

@wildfly-ci
Copy link

Core - Full Integration Build 9213 outcome was UNKNOWN using a merge of 5810c59
Summary: Canceled (Error while applying patch; cannot find commit 2afc90c in the https://github.com/wildfly/wildfly-core.git repository, possible reason: refs/pull/4017/merge branch was updated and the commit selected for the ... Build time: 00:00:17

@wildfly-ci
Copy link

Core - Full Integration Build 9214 outcome was FAILURE using a merge of c43be70
Summary: Compilation error: Compiler Build time: 00:01:14

@wildfly-ci
Copy link

Core - Full Integration Build 9216 outcome was FAILURE using a merge of c43be70
Summary: Compilation error: Compiler Build time: 00:01:37

@@ -427,7 +427,9 @@
String REFERENCE = "reference";
String REFERRAL_MODE = "referral-mode";
String REGISTER_JASPI_FACTORY = "register-jaspi-factory";
String REGEX = "regex";
Copy link
Contributor

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.

Copy link
Contributor Author

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)
Copy link
Contributor

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.

Copy link
Contributor Author

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;
Copy link
Contributor

Choose a reason for hiding this comment

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

Missing copyright header.

Copy link
Contributor Author

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 {
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

@wildfly-ci
Copy link

Core - Full Integration Build 9241 outcome was FAILURE using a merge of 1016637
Summary: Compilation error: Compiler Build time: 00:01:56

@wildfly-ci
Copy link

Core - Full Integration Build 9243 outcome was FAILURE using a merge of 1016637
Summary: Compilation error: Compiler Build time: 00:01:59

@wildfly-ci
Copy link

Core - Full Integration Build 9245 outcome was FAILURE using a merge of 2507974
Summary: Compilation error: Compiler Build time: 00:00:54

@wildfly-ci
Copy link

Core - Full Integration Build 9247 outcome was FAILURE using a merge of 2507974
Summary: Compilation error: Compiler Build time: 00:01:14

@wildfly-ci
Copy link

Core - Full Integration Build 9246 outcome was FAILURE using a merge of 4ae64b7
Summary: Compilation error: Compiler Build time: 00:00:47

@wildfly-ci
Copy link

Core - Full Integration Build 9248 outcome was FAILURE using a merge of 4ae64b7
Summary: Compilation error: Compiler Build time: 00:01:09

@fjuma
Copy link
Contributor

fjuma commented Dec 13, 2019

Thanks, @Skyllarr. This looks good, it just has some conflicts that need to be resolved.

@wildfly-ci
Copy link

Core - Full Integration Build 9323 outcome was FAILURE using a merge of c39741f
Summary: Compilation error: Compiler (new) Build time: 00:01:17

@wildfly-ci
Copy link

Core - Full Integration Build 9327 outcome was FAILURE using a merge of c39741f
Summary: Compilation error: Compiler (new) Build time: 00:01:25

@wildfly-ci
Copy link

Core - Full Integration Build 9329 outcome was FAILURE using a merge of 4002efe
Summary: Compilation error: Compiler Build time: 00:01:08

@wildfly-ci
Copy link

Core - Full Integration Build 9325 outcome was FAILURE using a merge of 4002efe
Summary: Compilation error: Compiler Build time: 00:01:27

@wildfly-ci
Copy link

Core - Full Integration Build 9326 outcome was FAILURE using a merge of 42f28b0
Summary: Compilation error: Compiler Build time: 00:00:43

@wildfly-ci
Copy link

Core - Full Integration Build 9330 outcome was FAILURE using a merge of 42f28b0
Summary: Compilation error: Compiler Build time: 00:01:00

@wildfly-ci
Copy link

Core - Full Integration Build 9328 outcome was FAILURE using a merge of 3efb194
Summary: Error while applying patch Build time: 00:00:04

@wildfly-ci
Copy link

Core - Full Integration Build 9332 outcome was UNKNOWN using a merge of 3efb194
Summary: Canceled (Error while applying patch; cannot find commit e7f5155 in the https://github.com/wildfly/wildfly-core.git repository, possible reason: refs/pull/4017/merge branch was updated and the commit selected for the ... Build time: 00:00:19

@wildfly-ci
Copy link

Core - Full Integration Build 9329 outcome was FAILURE using a merge of 19dca67
Summary: Compilation error: Compiler Build time: 00:00:50

@wildfly-ci
Copy link

Core - Full Integration Build 9333 outcome was FAILURE using a merge of 19dca67
Summary: Compilation error: Compiler Build time: 00:01:07

@wildfly-ci
Copy link

Core - Full Integration Build 9452 outcome was FAILURE using a merge of e197ab3
Summary: Compilation error: Compiler (new) Build time: 00:01:18

@wildfly-ci
Copy link

Core - Full Integration Build 9449 outcome was FAILURE using a merge of e197ab3
Summary: Compilation error: Compiler (new) Build time: 00:01:18

@wildfly-ci
Copy link

Core - Full Integration Build 9582 outcome was FAILURE using a merge of aa94054
Summary: Compilation error: Compiler Build time: 00:01:16

@wildfly-ci
Copy link

Core - Full Integration Build 9572 outcome was FAILURE using a merge of aa94054
Summary: Compilation error: Compiler Build time: 00:01:23

@wildfly-ci
Copy link

Core - Full Integration Build 9573 outcome was FAILURE using a merge of d80f246
Summary: Compilation error: Compiler Build time: 00:01:17

@wildfly-ci
Copy link

Core - Full Integration Build 9583 outcome was FAILURE using a merge of d80f246
Summary: Compilation error: Compiler Build time: 00:01:58

@wildfly-ci
Copy link

Core - Full Integration Build 9574 outcome was FAILURE using a merge of c0736ac
Summary: Compilation error: Compiler Build time: 00:01:23

@wildfly-ci
Copy link

Core - Full Integration Build 9584 outcome was FAILURE using a merge of c0736ac
Summary: Compilation error: Compiler Build time: 00:01:59


Roles roles = identity.getRoles();
Assert.assertTrue(roles.contains("admin"));
Assert.assertTrue(roles.contains("admin"));
Copy link

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 into admin
  • joe: no match, not kept
  • 2-guest-2: match, translated into guest

Hence looks like result should be {admin, guest}.
WDYT?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@wildfly-ci
Copy link

Core - Full Integration Build 9610 outcome was FAILURE using a merge of 35debf8
Summary: Compilation error: Compiler Build time: 00:00:47

@wildfly-ci
Copy link

Core - Full Integration Build 9631 outcome was FAILURE using a merge of 35debf8
Summary: Compilation error: Compiler Build time: 00:01:22

@darranl darranl removed the missing-reqs This PR is missing external requirements before it can be merged label May 15, 2020
@wildfly-ci
Copy link

Core - Full Integration Build 9636 outcome was FAILURE using a merge of a81d981
Summary: Compilation error: Compiler Build time: 00:00:54

@wildfly-ci
Copy link

Core - Full Integration Build 9659 outcome was FAILURE using a merge of a81d981
Summary: Compilation error: Compiler Build time: 00:02:27

@bstansberry bstansberry merged commit 1a4c905 into wildfly:master May 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature This PR adds a new feature to WildFly
Projects
None yet
6 participants