Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ELY-908] Fixed LegacyPropertiesSecurityRealmTest #649

Merged
merged 1 commit into from Feb 8, 2017

Conversation

olukas
Copy link

@olukas olukas commented Feb 2, 2017

https://issues.jboss.org/browse/ELY-908

Fixed wrong encoding of specialchars.properties

@wildfly-ci
Copy link

Linux Build 1454 outcome was FAILURE using a merge of ac45e2b
Summary: Tests failed: 1 (1 new), passed: 802, ignored: 18 Build time: 00:02:16

Failed tests

org.wildfly.security.credential.store.impl.KeyStoreCredentialStoreTest.shouldSupportKeyStoreFormat[format=PKCS12]: org.wildfly.security.credential.store.CredentialStoreException: ELY09516: Cannot acquire a credential from the credential store
	at org.wildfly.security.credential.store.impl.KeyStoreCredentialStore.retrieve(KeyStoreCredentialStore.java:401)
	at org.wildfly.security.credential.store.impl.KeyStoreCredentialStoreTest.shouldSupportKeyStoreFormat(KeyStoreCredentialStoreTest.java:127)
Caused by: java.security.UnrecoverableKeyException: Get Key failed: 1.2.840.113549.1.7.1 SecretKeyFactory not available
	at sun.security.pkcs12.PKCS12KeyStore.engineGetKey(PKCS12KeyStore.java:410)
	at sun.security.pkcs12.PKCS12KeyStore.engineGetEntry(PKCS12KeyStore.java:1282)
	at java.security.KeyStore.getEntry(KeyStore.java:1521)
	at org.wildfly.security.credential.store.impl.KeyStoreCredentialStore.retrieve(KeyStoreCredentialStore.java:399)
	... 37 more
Caused by: java.security.NoSuchAlgorithmException: 1.2.840.113549.1.7.1 SecretKeyFactory not available
	at javax.crypto.SecretKeyFactory.<init>(SecretKeyFactory.java:122)
	at javax.crypto.SecretKeyFactory.getInstance(SecretKeyFactory.java:160)
	at sun.security.pkcs12.PKCS12KeyStore.engineGetKey(PKCS12KeyStore.java:387)
	... 40 more


@wildfly-ci
Copy link

Windows Build 1450 outcome was FAILURE using a merge of ac45e2b
Summary: Tests failed: 1 (1 new), passed: 802, ignored: 18 Build time: 00:03:31

Failed tests

org.wildfly.security.credential.store.impl.KeyStoreCredentialStoreTest.shouldSupportKeyStoreFormat[format=PKCS12]: org.wildfly.security.credential.store.CredentialStoreException: ELY09516: Cannot acquire a credential from the credential store
	at org.wildfly.security.credential.store.impl.KeyStoreCredentialStore.retrieve(KeyStoreCredentialStore.java:401)
	at org.wildfly.security.credential.store.impl.KeyStoreCredentialStoreTest.shouldSupportKeyStoreFormat(KeyStoreCredentialStoreTest.java:127)
Caused by: java.security.UnrecoverableKeyException: Get Key failed: 1.2.840.113549.1.7.1 SecretKeyFactory not available
	at sun.security.pkcs12.PKCS12KeyStore.engineGetKey(PKCS12KeyStore.java:410)
	at sun.security.pkcs12.PKCS12KeyStore.engineGetEntry(PKCS12KeyStore.java:1282)
	at java.security.KeyStore.getEntry(KeyStore.java:1521)
	at org.wildfly.security.credential.store.impl.KeyStoreCredentialStore.retrieve(KeyStoreCredentialStore.java:399)
	... 37 more
Caused by: java.security.NoSuchAlgorithmException: 1.2.840.113549.1.7.1 SecretKeyFactory not available
	at javax.crypto.SecretKeyFactory.<init>(SecretKeyFactory.java:122)
	at javax.crypto.SecretKeyFactory.getInstance(SecretKeyFactory.java:160)
	at sun.security.pkcs12.PKCS12KeyStore.engineGetKey(PKCS12KeyStore.java:387)
	... 40 more


@olukas
Copy link
Author

olukas commented Feb 2, 2017

Failures in KeyStoreCredentialStoreTest should not be related to this fix.

Copy link

@hkalina hkalina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree with this changes, but maybe would be better to merge specialchars.properties with clear-special.properties, as they test the same thing.

@darranl darranl added the +1 DAL label Feb 6, 2017
@olukas
Copy link
Author

olukas commented Feb 7, 2017

@honza889 +1 for merge properties files and also testPlainFileSpecialChars() with testSpecialChar_*(). However I suggest one @Test for every user/password with special char (when something goes wrong then you see every failing special char, not only the first one).

@hkalina
Copy link

hkalina commented Feb 7, 2017

@olukas +1 feel free to do so

Copy link

@hkalina hkalina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(suggested test refactoring can wait, accepting as is)

@hkalina hkalina added the +1 HK label Feb 7, 2017
@darranl darranl merged commit ac45e2b into wildfly-security:master Feb 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants