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

Azure native test failure #1269

Closed
galderz opened this issue May 28, 2020 · 10 comments
Closed

Azure native test failure #1269

galderz opened this issue May 28, 2020 · 10 comments
Assignees
Milestone

Comments

@galderz
Copy link
Contributor

galderz commented May 28, 2020

  • OpenJDK 11u-dev
  • Graal 20.1
  • Quarkus master branch
  • Apache Quarkus quarkus-master branch
Caused by: java.security.InvalidKeyException: No installed provider supports this key: javax.crypto.spec.SecretKeySpec
	at javax.crypto.Mac.chooseProvider(Mac.java:392)
	at javax.crypto.Mac.init(Mac.java:435)
	at com.microsoft.azure.storage.StorageCredentialsAccountAndKey.getHmac256(StorageCredentialsAccountAndKey.java:190)
	at com.microsoft.azure.storage.core.StorageCredentialsHelper.computeHmac256(StorageCredentialsHelper.java:76)
	at com.microsoft.azure.storage.core.StorageCredentialsHelper.signBlobQueueAndFileRequest(StorageCredentialsHelper.java:133)
	at com.microsoft.azure.storage.core.StorageRequest.signBlobQueueAndFileRequest(StorageRequest.java:310)
	at com.microsoft.azure.storage.queue.CloudQueue$7.signRequest(CloudQueue.java:907)
	at com.microsoft.azure.storage.queue.CloudQueue$7.signRequest(CloudQueue.java:889)
	at com.microsoft.azure.storage.core.ExecutionEngine.setupStorageRequest(ExecutionEngine.java:341)
	... 50 more
Caused by: java.security.NoSuchAlgorithmException: class configured for Mac (provider: SunJCE) cannot be found.
	at java.security.Provider$Service.getImplClass(Provider.java:1857)
	at java.security.Provider$Service.newInstance(Provider.java:1818)
	at javax.crypto.Mac.chooseProvider(Mac.java:365)
	... 58 more
Caused by: java.lang.ClassNotFoundException: com.sun.crypto.provider.HmacCore$HmacSHA256
	at com.oracle.svm.core.hub.ClassForNameSupport.forName(ClassForNameSupport.java:60)
	at java.lang.Class.forName(DynamicHub.java:1194)
	at java.security.Provider$Service.getImplClass(Provider.java:1842)

Longer output

@galderz
Copy link
Contributor Author

galderz commented May 28, 2020

Can someone assign this to me?

@galderz
Copy link
Contributor Author

galderz commented May 28, 2020

Thx @jamesnetherton.

I've tried to add the following to camel-quarkus/integration-tests/azure/src/main/resources/application.properties, but didn't work:

quarkus.security.security-providers=SunJCE

However, if I run the test with -Dquarkus.native.additional-build-args=--enable-all-security-services it works.

@galderz
Copy link
Contributor Author

galderz commented May 28, 2020

I've seen this test pass about 1/2 months ago, so something recent change must have caused this. Looking.

@jamesnetherton
Copy link
Contributor

BTW the integration test used to be suppressed because it required access to Azure. I recently tweaked things to use Azurite for testing, so maybe that's why you did not see such issues in the past.

@galderz
Copy link
Contributor Author

galderz commented May 28, 2020

Ah I see, that would explain. I think Quarkus security config is missing but not only is the docu inconsistent, none of the properties work. Both quarkus.security.users.security-providers and quarkus.security.security-providers throw warnings:

16:53:01,100 WARN  [io.qua.config] Unrecognized configuration key "quarkus.security.users.security-providers" was provided; it will be ignored
15:37:55,313 WARN  [io.qua.config] Unrecognized configuration key "quarkus.security.security-providers" was provided; it will be ignored

@galderz
Copy link
Contributor Author

galderz commented May 28, 2020

Created quarkusio/quarkus#9664 to track the issue on Quarkus' side with security configuration.

@galderz
Copy link
Contributor Author

galderz commented May 28, 2020

Fixed the test, needed extra config and adding security extension. I'll send a PR tomorrow.

galderz added a commit to galderz/camel-quarkus that referenced this issue May 29, 2020
* Security provider needs to enabled and security extension needs adding.
galderz added a commit to galderz/camel-quarkus that referenced this issue May 29, 2020
* Security provider needs to enabled and security extension needs adding.
@galderz
Copy link
Contributor Author

galderz commented May 29, 2020

PR with fix.

galderz added a commit to galderz/camel-quarkus that referenced this issue Jun 2, 2020
@galderz
Copy link
Contributor Author

galderz commented Jun 2, 2020

PR with better fix.

@ppalaga
Copy link
Contributor

ppalaga commented Jun 3, 2020

Fixed via #1294 8c4d478

@ppalaga ppalaga closed this as completed Jun 3, 2020
jamesnetherton pushed a commit to jamesnetherton/camel-quarkus that referenced this issue Jun 10, 2020
@ppalaga ppalaga added this to the 1.0.0-CR3 milestone Jul 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants