[Red Hat JIRA] (ELY-2053) key-store-masked-password needs the elytron provider to be manually registered
by Farah Juma (Jira)
[ https://issues.redhat.com/browse/ELY-2053?page=com.atlassian.jira.plugin.... ]
Farah Juma updated ELY-2053:
----------------------------
Fix Version/s: 1.14.2.Final
(was: 1.15.0.CR1)
> key-store-masked-password needs the elytron provider to be manually registered
> ------------------------------------------------------------------------------
>
> Key: ELY-2053
> URL: https://issues.redhat.com/browse/ELY-2053
> Project: WildFly Elytron
> Issue Type: Bug
> Components: Authentication Client
> Affects Versions: 1.14.0.Final
> Reporter: Ricardo Martin Camarero
> Assignee: Ricardo Martin Camarero
> Priority: Major
> Fix For: 1.14.2.Final
>
>
> When you use a {{wildfly-config.xml}} that uses the {{key-store-masked-password}} the wildfly provider needs to be manually registered. This [PasswordFactory.getInstance call|https://github.com/wildfly-security/wildfly-elytron/blob/1.14.0.Fina...] does not pass the providers as in the rest of the calls and tehrefore default providers in the JVM are used.
> The other problem is that the corresponding test [ElytronXmlParserTest|https://github.com/wildfly-security/wildfly-elytron/...] adds the provider so the error is hidden inside the tests. Just removing that line from the test you see the exception:
> {noformat}
> org.wildfly.client.config.ConfigXMLParseException:
> ELY01133: Failed to create credential
> at file:/home/rmartinc/wildfly-elytron/auth/client/target/test-classes/org/wildfly/security/auth/client/test-wildfly-config-v1_4.xml:38:245
> at org.wildfly.security.auth.client.ElytronXmlParser.lambda$parseKeyStoreType$54(ElytronXmlParser.java:1977)
> at org.wildfly.security.auth.client.ElytronXmlParser$AbstractLoadingKeyStoreFactory.get(ElytronXmlParser.java:3640)
> at org.wildfly.security.auth.client.ElytronXmlParser$AbstractLoadingKeyStoreFactory.get(ElytronXmlParser.java:3624)
> at org.wildfly.security.auth.client.ElytronXmlParser.parseAuthenticationClientType(ElytronXmlParser.java:385)
> at org.wildfly.security.auth.client.ElytronXmlParser.parseAuthenticationClientConfiguration(ElytronXmlParser.java:261)
> at org.wildfly.security.auth.client.ElytronXmlParser.parseAuthenticationClientConfiguration(ElytronXmlParser.java:225)
> at org.wildfly.security.auth.client.ElytronXmlParserTest.testKeyStoreClearPassword(ElytronXmlParserTest.java:117)
> Caused by: java.security.NoSuchAlgorithmException: ELY08028: Invalid algorithm "masked-HMAC-SHA1-AES-128"
> at org.wildfly.security.password.PasswordFactory.getInstance(PasswordFactory.java:122)
> at org.wildfly.security.password.PasswordFactory.getInstance(PasswordFactory.java:76)
> at org.wildfly.security.auth.client.ElytronXmlParser.lambda$parseKeyStoreType$54(ElytronXmlParser.java:1973)
> ... 6 more
> {noformat}
--
This message was sent by Atlassian Jira
(v8.13.1#813001)
5 years, 2 months
[Red Hat JIRA] (ELY-2043) Incorrect and confusing trace message
by Farah Juma (Jira)
[ https://issues.redhat.com/browse/ELY-2043?page=com.atlassian.jira.plugin.... ]
Farah Juma updated ELY-2043:
----------------------------
Fix Version/s: 1.14.2.Final
(was: 1.15.0.CR1)
> Incorrect and confusing trace message
> -------------------------------------
>
> Key: ELY-2043
> URL: https://issues.redhat.com/browse/ELY-2043
> Project: WildFly Elytron
> Issue Type: Bug
> Components: HTTP
> Affects Versions: 1.14.0.Final
> Reporter: Mike Douglass
> Assignee: Sonia Zaldana
> Priority: Minor
> Fix For: 1.14.2.Final
>
>
> org.wildfly.security.http.util.AggregateServerMechanismFactory
> has one incorrect trace message and one which could be more helpful:
> getMechanismNames has
> {color:#0033b3}if {color}(log.isTraceEnabled()) {
> log.tracef({color:#067d17}"No %s provided by factories in %s: %s"{color}, HttpServerAuthenticationMechanismFactory.{color:#0033b3}class{color}.getSimpleName(), getClass().getSimpleName(), Arrays.toString(factories));
> }
> {color:#0033b3}return {color}names.toArray({color:#0033b3}new {color}String[names.size()]);
> should that be
> {color:#0033b3}if {color}(log.isTraceEnabled()) {
> log.tracef({color:#067d17}"%s factories in %s: %s"{color}, HttpServerAuthenticationMechanismFactory.{color:#0033b3}class{color}.getSimpleName(), getClass().getSimpleName(), Arrays.toString(factories));
> }
> {color:#0033b3}return {color}names.toArray({color:#0033b3}new {color}String[names.size()]);
> ?
> Same message in createAuthenticationMechanism
> {color:#0033b3}if {color}(log.isTraceEnabled()) {
> log.tracef({color:#067d17}"No %s provided by factories in %s: %s"{color}, HttpServerAuthenticationMechanismFactory.{color:#0033b3}class{color}.getSimpleName(), getClass().getSimpleName(), Arrays.toString(factories));
> }
> It would be useful if it supplied the mechanism e.g:
> {color:#0033b3}if {color}(log.isTraceEnabled()) {
> log.tracef({color:#067d17}"Mechanism %s not %s provided by factories in %s: %s"{color}, mechanism, HttpServerAuthenticationMechanismFactory.{color:#0033b3}class{color}.getSimpleName(), getClass().getSimpleName(), Arrays.toString(factories));
> }
>
>
--
This message was sent by Atlassian Jira
(v8.13.1#813001)
5 years, 2 months