[
https://issues.apache.org/jira/browse/KNOX-3616?focusedWorklogId=1056984&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-1056984
]
ASF GitHub Bot logged work on KNOX-3616:
----------------------------------------
Author: ASF GitHub Bot
Created on: 24/Nov/26 22:45
Start Date: 24/Nov/26 22:45
Worklog Time Spent: 10m
Work Description: smolnar82 opened a new pull request, #1544:
URL: https://github.com/apache/knox/pull/1544
[KNOX-3616](https://issues.apache.org/jira/browse/KNOX-3616) - Upgrade
Apache Shiro to 3.0.2
## What changes were proposed in this pull request?
Upgrade Apache Shiro from 2.2.1 to 3.0.2.
- Bumped `shiro.version` to `3.0.2`.
- Removed `<classifier>jakarta</classifier>` from the `shiro-core` and
`shiro-web` dependencies (root `pom.xml` dependencyManagement,
`gateway-provider-security-shiro`, `gateway-server`, `gateway-test`). Shiro 3.x
is Jakarta-only, and the `jakarta` classifier artifacts are no longer
published. The ehcache `jakarta` classifier is unchanged.
- `ShiroSubjectIdentityAdapter`: Shiro 3 changed
`PrincipalCollection.asSet()` from a raw `Set` to `Set<?>`, which broke the
unchecked conversion into `Set<String>`/`Set<Principal>`. Replaced it with the
typed `byType(String.class)` (KnoxLdapRealm case) and `byType(Principal.class)`
(KnoxPamRealm case). Behavior is the same: `KnoxLdapRealm` adds only `String`
principals (username and group names), and `KnoxPamRealm` adds `Principal`
objects.
No transitive dependencies are added. The Shiro modules pulled in by
`shiro-core`/`shiro-web` are the same ones as in 2.2.1; only the OWASP encoder
version moves from 1.4.0 to 1.6.0.
## How was this patch tested?
- `mvn -T1C clean install -DskipTests` passes, including test compilation,
the enforcer `dependencyConvergence` check and `dependency:analyze-only`.
- `gateway-provider-security-shiro` unit tests: 44 run, 0 failures, 1
skipped.
- Docker Compose E2E suite: 177 passed. This includes the LDAP-backed suites
that exercise `KnoxLdapRealm`/`ShiroFilter` (auth service, LDAP cache, LDAP
injection, LDAP proxy search, backend password alias retry).
## Integration Tests
No new integration tests were added. The existing E2E topologies already
configure Shiro with `KnoxLdapRealm` extensively, and they all pass with the
upgrade:
```
❯ tests-1 | ------------------------------------
tests-1 | Your code has been rated at 10.00/10
tests-1 |
tests-1 | Waiting for knox...
tests-1 | ============================= test session starts
==============================
tests-1 | platform linux
Issue Time Tracking
-------------------
Worklog Id: (was: 1056984)
Remaining Estimate: 0h
Time Spent: 10m
> Upgrade Apache Shiro to 3.0.2
> -----------------------------
>
> Key: KNOX-3616
> URL: https://issues.apache.org/jira/browse/KNOX-3616
> Project: Apache Knox
> Issue Type: Task
> Reporter: Sandor Molnar
> Assignee: Sandor Molnar
> Priority: Major
> Time Spent: 10m
> Remaining Estimate: 0h
>
> We need to bump to 3.0.2.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)