Skip to content

[ELY-2892] Restore the original behaviour of RoleMapping login module…#2267

Open
pedro-hos wants to merge 1 commit intowildfly-security:2.xfrom
pedro-hos:WFLY-20384-rolemapper
Open

[ELY-2892] Restore the original behaviour of RoleMapping login module…#2267
pedro-hos wants to merge 1 commit intowildfly-security:2.xfrom
pedro-hos:WFLY-20384-rolemapper

Conversation

@pedro-hos
Copy link
Copy Markdown
Contributor

… in the mapped role mapper

https://issues.redhat.com/browse/ELY-2892

@pedro-hos pedro-hos requested review from fjuma and skyllarr as code owners April 1, 2025 13:38
@ivassile
Copy link
Copy Markdown
Contributor

ivassile commented Apr 2, 2025

@pedro-hos As per our Elytron call, this PR is not ready for review.

@Message(id = 16005, value = "Path '%s' is a directory and cannot be used as a Role Mapper file.")
IllegalArgumentException propertiesRoleMapperPathIsDirectory(final String path);

@Message(id = 16006, value = "Cant read the provided properties file.")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
@Message(id = 16006, value = "Cant read the provided properties file.")
@Message(id = 16006, value = "Can not read the provided properties file.")

@Message(id = 16006, value = "Cant read the provided properties file.")
IllegalStateException cantReadPropertiesFile(@Cause Throwable cause);

@Message(id = 16007, value = "Cant close the provided properties file.")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
@Message(id = 16007, value = "Cant close the provided properties file.")
@Message(id = 16007, value = "Can not close the provided properties file.")


for(Map.Entry<String,String> entry: propertiesMap) {
if (rolesToMap.contains(entry.getKey())) {
for(String role: entry.getValue().split(",")) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I understand that the file format is strict, however would it be useful/better UX to trim roles to avoid searching for invisible typos? For example for entries like "a=b,c " or "a=b, c".

@pedro-hos pedro-hos force-pushed the WFLY-20384-rolemapper branch from 2e70bd6 to e5c42a0 Compare May 7, 2025 12:45
@pedro-hos pedro-hos requested a review from OndrejKotek May 7, 2025 12:45
@pedro-hos
Copy link
Copy Markdown
Contributor Author

Thank you for the review @OndrejKotek. I've just sent the PR with the changes.

@skyllarr
Copy link
Copy Markdown
Contributor

Hi @pedro-hos , since this is a new feature coming to WF ( https://issues.redhat.com/browse/WFLY-20384 ), this should target the 2.x branch

@pedro-hos pedro-hos changed the base branch from 2.6.x to 2.x July 31, 2025 13:05
@pedro-hos
Copy link
Copy Markdown
Contributor Author

Hi @skyllarr I've just changed the code base to 2.x. Thanks

@skyllarr
Copy link
Copy Markdown
Contributor

skyllarr commented Aug 1, 2025

@pedro-hos Are you able to rebase and push to this PR so the CI runs again? It failed before and as it is expired, I can't re-run the failed tests manually. Thanks!

@pedro-hos pedro-hos force-pushed the WFLY-20384-rolemapper branch from e5c42a0 to 0b9ea5c Compare August 1, 2025 18:22
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.

4 participants