{"action":"created","issue":{"url":"https://api.github.com/repos/pac4j/pac4j/issues/355","labels_url":"https://api.github.com/repos/pac4j/pac4j/issues/355/labels{/name}","comments_url":"https://api.github.com/repos/pac4j/pac4j/issues/355/comments","events_url":"https://api.github.com/repos/pac4j/pac4j/issues/355/events","html_url":"https://github.com/pac4j/pac4j/issues/355","id":116971937,"number":355,"title":"JWT  \"Illegal key size\"","user":{"login":"gschrader","id":868298,"avatar_url":"https://avatars.githubusercontent.com/u/868298?v=3","gravatar_id":"","url":"https://api.github.com/users/gschrader","html_url":"https://github.com/gschrader","followers_url":"https://api.github.com/users/gschrader/followers","following_url":"https://api.github.com/users/gschrader/following{/other_user}","gists_url":"https://api.github.com/users/gschrader/gists{/gist_id}","starred_url":"https://api.github.com/users/gschrader/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gschrader/subscriptions","organizations_url":"https://api.github.com/users/gschrader/orgs","repos_url":"https://api.github.com/users/gschrader/repos","events_url":"https://api.github.com/users/gschrader/events{/privacy}","received_events_url":"https://api.github.com/users/gschrader/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-11-15T04:20:06Z","updated_at":"2015-11-15T16:23:09Z","closed_at":null,"body":"I was trying to use the JwtGenerator however I'm getting an exception, even running the pac4j jwt unit tests I get the same exception:\r\n\r\n```\r\nRunning org.pac4j.jwt.JwtTests\r\nTests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.573 sec <<< FAILURE!\r\ntestGenerateAuthenticate(org.pac4j.jwt.JwtTests)  Time elapsed: 0.538 sec  <<< ERROR!\r\norg.pac4j.core.exception.TechnicalException: Cannot generate JWT\r\n\tat org.pac4j.jwt.profile.JwtGenerator.generate(JwtGenerator.java:91)\r\n\tat org.pac4j.jwt.JwtTests.testGenerateAuthenticate(JwtTests.java:51)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\tat java.lang.reflect.Method.invoke(Method.java:497)\r\n\tat org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)\r\n\tat org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)\r\n\tat org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)\r\n\tat org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)\r\n\tat org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)\r\n\tat org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)\r\n\tat org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)\r\n\tat org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)\r\n\tat org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)\r\n\tat org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)\r\n\tat org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)\r\n\tat org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)\r\n\tat org.junit.runners.ParentRunner.run(ParentRunner.java:309)\r\n\tat org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)\r\n\tat org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)\r\n\tat org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\tat java.lang.reflect.Method.invoke(Method.java:497)\r\n\tat org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)\r\n\tat org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)\r\n\tat org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)\r\n\tat org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)\r\n\tat org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)\r\nCaused by: com.nimbusds.jose.JOSEException: Couldn't create AES/GCM/NoPadding cipher: Illegal key size\r\n\tat com.nimbusds.jose.crypto.AESGCM.encrypt(AESGCM.java:93)\r\n\tat com.nimbusds.jose.crypto.ContentCryptoProvider.encrypt(ContentCryptoProvider.java:169)\r\n\tat com.nimbusds.jose.crypto.DirectEncrypter.encrypt(DirectEncrypter.java:118)\r\n\tat com.nimbusds.jose.JWEObject.encrypt(JWEObject.java:350)\r\n\tat org.pac4j.jwt.profile.JwtGenerator.generate(JwtGenerator.java:85)\r\n\t... 30 more\r\nCaused by: java.security.InvalidKeyException: Illegal key size\r\n\tat javax.crypto.Cipher.checkCryptoPerm(Cipher.java:1039)\r\n\tat javax.crypto.Cipher.implInit(Cipher.java:805)\r\n\tat javax.crypto.Cipher.chooseProvider(Cipher.java:864)\r\n\tat javax.crypto.Cipher.init(Cipher.java:1396)\r\n\tat javax.crypto.Cipher.init(Cipher.java:1327)\r\n\tat com.nimbusds.jose.crypto.AESGCM.encrypt(AESGCM.java:89)\r\n\t... 34 more\r\n\r\n\r\nResults :\r\n\r\nTests in error: \r\n  testGenerateAuthenticate(org.pac4j.jwt.JwtTests): Cannot generate JWT\r\n\r\nTests run: 2, Failures: 0, Errors: 1, Skipped: 0\r\n```\r\n\r\nAny ideas what is going on?\r\n"},"comment":{"url":"https://api.github.com/repos/pac4j/pac4j/issues/comments/156825823","html_url":"https://github.com/pac4j/pac4j/issues/355#issuecomment-156825823","issue_url":"https://api.github.com/repos/pac4j/pac4j/issues/355","id":156825823,"user":{"login":"gschrader","id":868298,"avatar_url":"https://avatars.githubusercontent.com/u/868298?v=3","gravatar_id":"","url":"https://api.github.com/users/gschrader","html_url":"https://github.com/gschrader","followers_url":"https://api.github.com/users/gschrader/followers","following_url":"https://api.github.com/users/gschrader/following{/other_user}","gists_url":"https://api.github.com/users/gschrader/gists{/gist_id}","starred_url":"https://api.github.com/users/gschrader/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gschrader/subscriptions","organizations_url":"https://api.github.com/users/gschrader/orgs","repos_url":"https://api.github.com/users/gschrader/repos","events_url":"https://api.github.com/users/gschrader/events{/privacy}","received_events_url":"https://api.github.com/users/gschrader/received_events","type":"User","site_admin":false},"created_at":"2015-11-15T16:23:09Z","updated_at":"2015-11-15T16:23:09Z","body":"Thank you that did the trick, is there a way to make it fall back to the limited policy files? Or is that a bad idea?"}}