[JBoss JIRA] (ELY-1569) Revisit X500PrincipalUtil optimalisation
by Martin Choma (JIRA)
Martin Choma created ELY-1569:
---------------------------------
Summary: Revisit X500PrincipalUtil optimalisation
Key: ELY-1569
URL: https://issues.jboss.org/browse/ELY-1569
Project: WildFly Elytron
Issue Type: Bug
Components: X.500
Affects Versions: 1.3.0.Final
Reporter: Martin Choma
Priority: Optional
Reason why it was added may be fixed in OpenJDK already. David thinks so, but I was not able to find issue for that.
Note, this was needed for older java 1.8 releases. So user with older java in use can experience problems with fixed Elytron. Must migrate to newer version of java.
{code}
static {
Class<?> x500Name = null;
MethodHandle asX500PrincipalHandle = null;
try {
x500Name = Class.forName("sun.security.x509.X500Name", true, X500PrincipalUtil.class.getClassLoader());
asX500PrincipalHandle = MethodHandles.publicLookup().unreflect(x500Name.getDeclaredMethod("asX500Principal"));
} catch (Throwable t) {
/*
* This is intended to be a best efforts optimisation, if it fails for ANY reason we don't support the optimisation
* and resort to default behaviour.
*
* Throwing any Exception or Error from this static block results in a NoClassDefFoundError for any access to the
* class and subsequently even the non-optimised scenario is unavailable.
*/
log.trace("X550Name.asX500Principal() is not available.", t);
}
X500_NAME_CLASS = x500Name;
AS_X500_PRINCIPAL_HANDLE = asX500PrincipalHandle;
}
{code}
Related hipchat discussion
{noformat}
David Lloyd·Apr-26 3:44 PM
what JDK version?
that's not really an error per se
Darran Lofthouse·Apr-26 3:46 PM
it's a feature ;-)
David Lloyd·Apr-26 3:47 PM
tbh it's probably not needed anymore; the original code there is 3 years old
Martin Choma·Apr-26 3:48 PM
java version "1.8.0_161"
Java(TM) SE Runtime Environment (build 1.8.0_161-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.161-b12, mixed mode)
David Lloyd·Apr-26 3:48 PM
I think the original issue was fixed in openjdk a while back
Martin Choma·Apr-26 4:57 PM
David, I can see the exception on the Oracle JDK 1.8.0_172 as well
Darran Lofthouse·Apr-26 5:05 PM
Is the optimisation provided by that class still beneficial?
David Lloyd·Apr-26 5:11 PM
it's required for older 1.8 releases
note that it's a TRACE message though
it's not an error, it's just indicating that the detection of the internal type failed
so it won't be used
I did previously get a directive that we need not support older 1.8 releases though
so we could drop that code if desired
this would be considered code cleanup, so it's not an enhancement and not a bug fix
Martin Choma·Apr-26 5:20 PM
"1.8 releases" you mean jboss-modules 1.8?
and when searching internal type failed, which will be used then?
Darran Lofthouse·Apr-26 5:22 PM
If that type is not found and convert set to true we pass the name into the X500Principal constructor
David Lloyd·Apr-26 5:24 PM
no @MartinChoma I mean older Java 8 releases
older versions of Java returned X500Name for certain certificate methods instead of X500Principal
if you weren't ready for that, you can end up with an unexpected error condition
Martin Choma·Apr-26 5:32 PM
and now as jdk is fixed we can remove that workaround?
David Lloyd·Apr-26 5:32 PM
yes it should be safe
Martin Choma·Apr-26 5:34 PM
also for ibm jdk?
David Lloyd·Apr-26 5:34 PM
IBM never had the problem AFAIK
Martin Choma·Apr-26 5:50 PM
It would be nice if we know the JDK issue, but I can't find the one.
{noformat}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 7 months
[JBoss JIRA] (AG-76) Check for usage of problematic java APIs
by Luis Barreiro (JIRA)
Luis Barreiro created AG-76:
-------------------------------
Summary: Check for usage of problematic java APIs
Key: AG-76
URL: https://issues.jboss.org/browse/AG-76
Project: Agroal
Issue Type: Enhancement
Components: build
Affects Versions: 0.4
Reporter: Luis Barreiro
Assignee: Luis Barreiro
Fix For: 0.5
Add the "forbidden APIs" plugin to the build.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 7 months
[JBoss JIRA] (ELY-816) Support for masked passwords in client XML config
by David Lloyd (JIRA)
[ https://issues.jboss.org/browse/ELY-816?page=com.atlassian.jira.plugin.sy... ]
David Lloyd commented on ELY-816:
---------------------------------
There was a hashed-password-type when this was written in 2016, but I think it is gone now, in favor of the credential store. I think a dedicated type may be necessary - if we decide this should still be supported.
> Support for masked passwords in client XML config
> -------------------------------------------------
>
> Key: ELY-816
> URL: https://issues.jboss.org/browse/ELY-816
> Project: WildFly Elytron
> Issue Type: Task
> Reporter: David Lloyd
> Assignee: Jan Kalina
> Priority: Critical
> Fix For: 1.3.1.Final
>
>
> We need a way to support masked passwords in the auth configuration file, either as:
> * A dedicated masked-password-type XML type
> * Adding necessary fields to hashed-password-type
> * Adding a modular crypt format
> Needs to be supported anywhere passwords are allowed.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 8 months
[JBoss JIRA] (WFCORE-3769) Use Galleon for the WildFly Core build
by Brian Stansberry (JIRA)
[ https://issues.jboss.org/browse/WFCORE-3769?page=com.atlassian.jira.plugi... ]
Brian Stansberry updated WFCORE-3769:
-------------------------------------
Description:
Create galleon feature packs, use them to produce the thin and fat dists and any 'dists' created for the testsuite.
Continue to produce a legacy core feature pack.
was:
Create galleon feature packs, use them to produce the thin and fat dists and any 'dists' created for the testsuite.
Continue to produce legacy feature packs.
> Use Galleon for the WildFly Core build
> --------------------------------------
>
> Key: WFCORE-3769
> URL: https://issues.jboss.org/browse/WFCORE-3769
> Project: WildFly Core
> Issue Type: Task
> Components: Server
> Reporter: Brian Stansberry
> Assignee: Alexey Loubyansky
>
> Create galleon feature packs, use them to produce the thin and fat dists and any 'dists' created for the testsuite.
> Continue to produce a legacy core feature pack.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 8 months