Skip to content

Instantly share code, notes, and snippets.

View darranl's full-sized avatar

Darran Lofthouse darranl

View GitHub Profile
@darranl
darranl / Affected Files
Created August 18, 2022 10:55
wildfly-ee-security
find -name "*.xml" -type f | grep -v target | xargs grep wildfly-ee-security 2> /dev/null
./ee-security/pom.xml: <artifactId>wildfly-ee-security</artifactId>
./boms/legacy-ee/pom.xml: <artifactId>wildfly-ee-security</artifactId>
./boms/standard-ee/pom.xml: <artifactId>wildfly-ee-security-jakarta</artifactId>
./ee-9/common/src/main/resources/license/preview-feature-pack-common-licenses.xml: <artifactId>wildfly-ee-security-jakarta</artifactId>
./ee-9/source-transform/ee-security/pom.xml: <artifactId>wildfly-ee-security-jakarta</artifactId>
./ee-feature-pack/common/src/main/resources/license/ee-feature-pack-common-licenses.xml: <artifactId>wildfly-ee-security-jakarta</artifactId>
./ee-feature-pack/common/src/main/resources/modules/system/layers/base/org/wildfly/extension/ee-security/main/module.xml: <artifact name="\${org.wildfly:wildfly-ee-security@module.jakarta.suffix@}"/>
./ee-feature-pack/common/pom.xml: <artifactId>wildfly-ee-security-jakarta<
Thread [MSC service thread 1-5] (Suspended (breakpoint at line 29 in BackedAnnotatedMethod))
owns: BackedAnnotatedType$BackedAnnotatedMethods (id=954)
owns: WeakLazyValueHolder$1 (id=955)
owns: Container (id=956)
owns: WeldBootstrap (id=957)
BackedAnnotatedMethod<X>.<init>(Method, BackedAnnotatedType<X>, SharedObjectCache) line: 29
BackedAnnotatedMethod<X>.of(Method, BackedAnnotatedType<Y>, SharedObjectCache) line: 25
BackedAnnotatedType$BackedAnnotatedMethods.computeValue() line: 198
BackedAnnotatedType$BackedAnnotatedMethods.computeValue() line: 191
BackedAnnotatedType$BackedAnnotatedMethods(LazyValueHolder<T>).get() line: 46
# Created at 2021-05-11T08:30:59.336
Corrupted STDOUT by directly writing to native stream in forked JVM 1. Stream '2021-05-11 08:30:59'.
java.lang.IllegalArgumentException: Stream stdin corrupted. Expected comma after third character in command '2021-05-11 08:30:59'.
at org.apache.maven.plugin.surefire.booterclient.output.ForkClient$OperationalData.<init>(ForkClient.java:511)
at org.apache.maven.plugin.surefire.booterclient.output.ForkClient.processLine(ForkClient.java:209)
at org.apache.maven.plugin.surefire.booterclient.output.ForkClient.consumeLine(ForkClient.java:176)
at org.apache.maven.plugin.surefire.booterclient.output.ThreadedStreamConsumer$Pumper.run(ThreadedStreamConsumer.java:88)
at java.base/java.lang.Thread.run(Thread.java:834)
@darranl
darranl / Stack.txt
Created April 7, 2021 09:25
CDI Error - OpenJDK 11
2021-04-07 10:19:04,915 ERROR [io.undertow.request] (default task-1) UT005023: Exception handling request to /jwks/endp/verifyKeyLocationAsJWKResource: org.jboss.resteasy.spi.UnhandledException: org.jboss.weld.exceptions.WeldException: WELD-001524: Unable to load proxy class for bean Producer Method [JsonWebToken] with qualifiers [@Any @Default] declared as [[UnbackedAnnotatedMethod] @Produces @RequestScoped io.smallrye.jwt.auth.cdi.PrincipalProducer.currentJWTPrincipalOrNull()] with class class java.lang.Object
at deployment.ECPublicKeyAsJWKLocationTest.war//org.jboss.resteasy.core.ExceptionHandler.handleApplicationException(ExceptionHandler.java:106)
at deployment.ECPublicKeyAsJWKLocationTest.war//org.jboss.resteasy.core.ExceptionHandler.handleException(ExceptionHandler.java:372)
at deployment.ECPublicKeyAsJWKLocationTest.war//org.jboss.resteasy.core.SynchronousDispatcher.writeException(SynchronousDispatcher.java:218)
at deployment.ECPublicKeyAsJWKLocationTest.war//org.jboss.resteasy.core.SynchronousDis
@darranl
darranl / command.txt
Last active February 22, 2021 10:14
Inline Expression Encryption - Long Chain Example Commands
# Command Line Tools
# Password - KeyStoreOnePassword
keytool -genkeypair -alias test -keystore keystoreone.keystore
# Password CredentialStoreOnePassword - Storing KeyStoreOnePassword
java -jar ~/src/2021/wildfly-elytron/tool/target/wildfly-elytron-tool-1.15.0.CR2-SNAPSHOT.jar credential-store --create --location credentialstoreone.credentialstore --add keystoreone
# Password CredentialStoreTwoPassword - Storing CredentialStoreOnePassword
java -jar ~/src/2021/wildfly-elytron/tool/target/wildfly-elytron-tool-1.15.0.CR2-SNAPSHOT.jar credential-store --create --location credentialstoretwo.credentialstore --add credentialstoreone
@darranl
darranl / ELY-2086-Notes.txt
Last active February 11, 2021 16:43
Example Commands Encrypting Clear Text Using a SecretKey from the CredentialStore
# Create KeyStoreCredentialStore
java -jar tool/target/wildfly-elytron-tool-1.14.2.CR1-SNAPSHOT.jar credential-store --create --location /home/darranl/tmp/keystorecs.cs
java -jar tool/target/wildfly-elytron-tool-1.14.2.CR1-SNAPSHOT.jar credential-store --location /home/darranl/tmp/keystorecs.cs --generate-secret-key test
# Create PropertiesCredentialStore
java -jar tool/target/wildfly-elytron-tool-1.14.2.CR1-SNAPSHOT.jar credential-store --create --type PropertiesCredentialStore --location /home/darranl/tmp/propertiescs.cs
# CLI Commands Used For Testing
###################
# STANDALONE MODE #
###################
# Logging may be useful to see the resolution in action.
/subsystem=logging/logger=org.wildfly.extension.elytron:add(level=TRACE)
# Expression Resolver Activation (Default credential-store)
# Starting Servers
bin/standalone.sh -c standalone-ha.xml -Djboss.node.name=nodea -Djboss.socket.binding.port-offset=200
bin/standalone.sh -c standalone-ha.xml -Djboss.node.name=nodeb -Djboss.socket.binding.port-offset=300
bin/standalone.sh -c standalone-load-balancer.xml
# The servers both need to be configured the same
./nodea/bin/jboss-cli.sh -c --controller=localhost:10190
./nodea/bin/jboss-cli.sh -c --controller=localhost:10290
# Switching Servers
@darranl
darranl / Stack.txt
Last active November 11, 2020 09:17
Thread [default task-1] (Suspended (breakpoint at line 168 in Krb5Util))
owns: LdapClient (id=351)
owns: Object (id=352)
Krb5Util.getInitialTicket(GSSCaller, String, AccessControlContext) line: 168
Krb5InitCredential$1.run() line: 377
Krb5InitCredential$1.run() line: 373
AccessController.doPrivileged(PrivilegedExceptionAction<T>) line: not available [native method]
Krb5InitCredential.getTgt(GSSCaller, Krb5NameElement, int) line: 372
Krb5InitCredential.getInstance(GSSCaller, Krb5NameElement, int) line: 160
Krb5MechFactory.getCredentialElement(GSSNameSpi, int, int, int) line: 126
[remote "upstream"]
url = git@github.com:wildfly-security/wildfly-elytron.git
fetch = +refs/heads/*:refs/remotes/upstream/*
fetch = +refs/pull/*/head:refs/remotes/upstream/pr/*
fetch = +refs/pull/*/merge:refs/remotes/merge/pr/*