OSGI Missing Provide-Capability entry for org.apache.shiro.crypto.hash.HashSpi
envgap__apache__shiro-1117
01 / FAILURE SIGNATURE
As reported upstream
Caused by: java.lang.UnsupportedOperationException: Cannot create a hash with the given algorithm: argon2id
Not a benchmark task.
- The project already builds and runs before the fix, so there is nothing to repair.
02 / ENVIRONMENT RECIPE
- Base commit
9a17653c7a63f777a34ccc14d7aeed805fc4a033- Manifest
crypto/hash/pom.xml- Reproduce
Awaiting issue-specific recipe- Run under trace
Awaiting a meaningful runtime command
03 / ORIGINAL ISSUE TEXT
apache/shiro #1117 · read the original issue
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/shiro/issues?q=is%3Aissue) and found no similar issues.
### Environment
Apache Karaf 4.4.4 & JDK 17 & Fedora 38
### Shiro version
2.0.0 alpha 3
### What was the actual outcome?
During password encryption I can see that shiro isn't able to see argon hash provider.
### What was the expected outcome?
Shiro is able to use bcrypt & argon hash providers
### How to reproduce
Import shiro bundles:
<feature version="${org.apache.shiro.version}">shiro-core</feature>
<bundle>mvn:org.apache.shiro.crypto/shiro-hashes-bcrypt/${org.apache.shiro.version}</bundle>
<bundle>mvn:org.apache.shiro.crypto/shiro-hashes-argon2/${org.apache.shiro.version}</bundle>
Deploy any application that uses shiro and is able to run under Karaf & OSGI
### Debug logs
Caused by: java.lang.UnsupportedOperationException: Cannot create a hash with the given algorithm: argon2id
at org.apache.shiro.crypto.hash.DefaultHashService.computeHash(DefaultHashService.java:98) ~[!/:2.0.0-alpha-3]
at org.apache.shiro.authc.credential.DefaultPasswordService.passwordsMatch(DefaultPasswordService.java:181) ~[!/:2.0.0-alpha-3]
at tech.pantheon.chronos.aaa.impl.security.realm.impl.TokenCredentialsMatcher.doCredentialsMatch(TokenCredentialsMatcher.java:36) ~[?:?]
at org.apache.shiro.realm.AuthenticatingRealm.assertCredentialsMatch(AuthenticatingRealm.java:600) ~[!/:2.0.0-alpha-3]
at org.apache.shiro.realm.AuthenticatingRealm.getAuthenticationInfo(AuthenticatingRealm.java:581) ~[!/:2.0.0-alpha-3]
at Proxy7d5c2798_ad1d_48c5_aa34_93f64a110877.getAuthenticationInfo(Unknown Source) ~[?:?]
at org.apache.shiro.authc.pam.ModularRealmAuthenticator.doSingleRealmAuthentication(ModularRealmAuthenticator.java:180) ~[!/:2.0.0-alpha-3]
at org.apache.shiro.authc.pam.ModularRealmAuthenticator.doAuthenticate(ModularRealmAuthenticator.java:273) ~[!/:2.0.0-alpha-3]
at org.apache.shiro.authc.AbstractAuthenticator.authenticate(AbstractAuthenticator.java:198) ~[!/:2.0.0-alpha-3]
04 / LABELS
Labels from the report text only; not yet run
No supported category has been assigned.
Label rules and the text that matched
[]