Comments (10)
::jar
is a non-existent dependency so it's not that it's missing from a repository. How did you install the CLI plugins? What do you have in "SPRING_HOME/lib"?
from spring-cloud-security.
To tell you the truth, I am not really sure how I installed the CLI, it has
been a while since I did it. Is SPRING_HOME an environment variable? It
doesn't appear to be set in my environment....
from spring-cloud-security.
This will not work with Spring Cloud (No plugins):
$ ls $(dirname `which spring`)/../lib
spring-boot-cli-1.2.0.BUILD-SNAPSHOT.jar
This will:
$ ls $(dirname `which spring`)/../lib
bcpkix-jdk15on-1.47.jar spring-boot-cli-1.1.5.RELEASE.jar spring-security-crypto-3.2.4.RELEASE.jar
bcprov-jdk15on-1.47.jar spring-cloud-cli-1.0.0.BUILD-SNAPSHOT.jar spring-security-rsa-1.0.0.M2.jar
install-0.0.1.jar spring-core-4.0.6.RELEASE.jar
from spring-cloud-security.
Here is what I see
bcpkix-jdk15on-1.47.jar spring-cloud-cli-1.0.0.BUILD-SNAPSHOT.jar
bcprov-jdk15on-1.47.jar spring-core-4.0.7.RELEASE.jar
install-0.0.1.jar spring-security-crypto-3.2.5.RELEASE.jar
spring-boot-cli-1.1.7.RELEASE.jar spring-security-rsa-1.0.0.M2.jar
from spring-cloud-security.
Looks OK. What is your app.groovy?
from spring-cloud-security.
Here is what is in my
@Grab('spring-boot-starter-security')
@Controller
@EnableOAuth2Sso
class Application {
@RequestMapping('/')
String home() {
'Hello World'
}
}
I just ran spring run again and I am getting slightly different errors, not
sure why it is different.
$ spring run app.groovy
Resolving dependencies........
startup failed:
file:/Users/ryanjbaxter/groovy/spring-cloud-security/app.groovy: -1: unable
to resolve class org.springframework.cloud.cloudfoundry.sso.EnableOAuth2Sso
@ line -1, column -1.
file:/Users/ryanjbaxter/groovy/spring-cloud-security/app.groovy: -1: unable
to resolve class
org.springframework.cloud.cloudfoundry.sso.OAuth2SsoConfigurerAdapter
@ line -1, column -1.
2 errors
from spring-cloud-security.
I'd say you have an old snapshot (pre M1) of spring-cloud-cli in that lib folder. You should be able to just build that locally and overwrite the jar file.
from spring-cloud-security.
This is turning into a bit of a nightmare....
So I can't build spring-cloud-cli until I build spring-cloud-netflix and
spring-cloud-config. So I went to go build spring-cloud-config and got
test failures, is there something I need to do to get these tests to pass?
-------------------------------------------------------------------------------
Test set: org.springframework.cloud.config.server.EncryptionControllerTests
-------------------------------------------------------------------------------
Tests run: 10, Failures: 0, Errors: 5, Skipped: 0, Time elapsed: 0.529 sec
<<< FAILURE! - in
org.springframework.cloud.config.server.EncryptionControllerTests
sunnyDayRsaKey(org.springframework.cloud.config.server.EncryptionControllerTests)
Time elapsed: 0.326 sec <<< ERROR!
java.lang.IllegalArgumentException: Unable to initialize due to invalid
secret key
at javax.crypto.Cipher.checkCryptoPerm(Cipher.java:1024)
at javax.crypto.Cipher.implInit(Cipher.java:790)
at javax.crypto.Cipher.chooseProvider(Cipher.java:849)
at javax.crypto.Cipher.init(Cipher.java:1348)
at javax.crypto.Cipher.init(Cipher.java:1282)
at
org.springframework.security.crypto.encrypt.CipherUtils.initCipher(CipherUtils.java:105)
at
org.springframework.security.crypto.encrypt.AesBytesEncryptor.encrypt(AesBytesEncryptor.java:65)
at
org.springframework.security.rsa.crypto.RsaSecretEncryptor.encrypt(RsaSecretEncryptor.java:122)
at
org.springframework.security.rsa.crypto.RsaSecretEncryptor.encrypt(RsaSecretEncryptor.java:104)
at
org.springframework.security.rsa.crypto.RsaSecretEncryptor.encrypt(RsaSecretEncryptor.java:90)
at
org.springframework.cloud.config.server.EncryptionController.encrypt(EncryptionController.java:150)
at
org.springframework.cloud.config.server.EncryptionControllerTests.sunnyDayRsaKey(EncryptionControllerTests.java:70)
sunnyDaySymmetricKey(org.springframework.cloud.config.server.EncryptionControllerTests)
Time elapsed: 0.012 sec <<< ERROR!
java.lang.IllegalArgumentException: Unable to initialize due to invalid
secret key
at javax.crypto.Cipher.checkCryptoPerm(Cipher.java:1024)
at javax.crypto.Cipher.implInit(Cipher.java:790)
at javax.crypto.Cipher.chooseProvider(Cipher.java:849)
at javax.crypto.Cipher.init(Cipher.java:1348)
at javax.crypto.Cipher.init(Cipher.java:1282)
at
org.springframework.security.crypto.encrypt.CipherUtils.initCipher(CipherUtils.java:105)
at
org.springframework.security.crypto.encrypt.AesBytesEncryptor.encrypt(AesBytesEncryptor.java:65)
at
org.springframework.security.crypto.encrypt.HexEncodingTextEncryptor.encrypt(HexEncodingTextEncryptor.java:36)
at
org.springframework.cloud.config.server.EncryptionController.encrypt(EncryptionController.java:150)
at
org.springframework.cloud.config.server.EncryptionControllerTests.sunnyDaySymmetricKey(EncryptionControllerTests.java:63)
decryptEnvironment(org.springframework.cloud.config.server.EncryptionControllerTests)
Time elapsed: 0.007 sec <<< ERROR!
java.lang.IllegalArgumentException: Unable to initialize due to invalid
secret key
at javax.crypto.Cipher.checkCryptoPerm(Cipher.java:1024)
at javax.crypto.Cipher.implInit(Cipher.java:790)
at javax.crypto.Cipher.chooseProvider(Cipher.java:849)
at javax.crypto.Cipher.init(Cipher.java:1348)
at javax.crypto.Cipher.init(Cipher.java:1282)
at
org.springframework.security.crypto.encrypt.CipherUtils.initCipher(CipherUtils.java:105)
at
org.springframework.security.crypto.encrypt.AesBytesEncryptor.encrypt(AesBytesEncryptor.java:65)
at
org.springframework.security.crypto.encrypt.HexEncodingTextEncryptor.encrypt(HexEncodingTextEncryptor.java:36)
at
org.springframework.cloud.config.server.EncryptionController.encrypt(EncryptionController.java:150)
at
org.springframework.cloud.config.server.EncryptionControllerTests.decryptEnvironment(EncryptionControllerTests.java:93)
formDataIn(org.springframework.cloud.config.server.EncryptionControllerTests)
Time elapsed: 0.129 sec <<< ERROR!
java.lang.IllegalArgumentException: Unable to initialize due to invalid
secret key
at javax.crypto.Cipher.checkCryptoPerm(Cipher.java:1024)
at javax.crypto.Cipher.implInit(Cipher.java:790)
at javax.crypto.Cipher.chooseProvider(Cipher.java:849)
at javax.crypto.Cipher.init(Cipher.java:1348)
at javax.crypto.Cipher.init(Cipher.java:1282)
at
org.springframework.security.crypto.encrypt.CipherUtils.initCipher(CipherUtils.java:105)
at
org.springframework.security.crypto.encrypt.AesBytesEncryptor.encrypt(AesBytesEncryptor.java:65)
at
org.springframework.security.rsa.crypto.RsaSecretEncryptor.encrypt(RsaSecretEncryptor.java:122)
at
org.springframework.security.rsa.crypto.RsaSecretEncryptor.encrypt(RsaSecretEncryptor.java:104)
at
org.springframework.security.rsa.crypto.RsaSecretEncryptor.encrypt(RsaSecretEncryptor.java:90)
at
org.springframework.cloud.config.server.EncryptionController.encrypt(EncryptionController.java:150)
at
org.springframework.cloud.config.server.EncryptionControllerTests.formDataIn(EncryptionControllerTests.java:85)
randomizedCipher(org.springframework.cloud.config.server.EncryptionControllerTests)
Time elapsed: 0.003 sec <<< ERROR!
java.lang.IllegalArgumentException: Unable to initialize due to invalid
secret key
at javax.crypto.Cipher.checkCryptoPerm(Cipher.java:1024)
at javax.crypto.Cipher.implInit(Cipher.java:790)
at javax.crypto.Cipher.chooseProvider(Cipher.java:849)
at javax.crypto.Cipher.init(Cipher.java:1348)
at javax.crypto.Cipher.init(Cipher.java:1282)
at
org.springframework.security.crypto.encrypt.CipherUtils.initCipher(CipherUtils.java:105)
at
org.springframework.security.crypto.encrypt.AesBytesEncryptor.encrypt(AesBytesEncryptor.java:65)
at
org.springframework.security.crypto.encrypt.HexEncodingTextEncryptor.encrypt(HexEncodingTextEncryptor.java:36)
at
org.springframework.cloud.config.server.EncryptionController.encrypt(EncryptionController.java:150)
at
org.springframework.cloud.config.server.EncryptionControllerTests.randomizedCipher(EncryptionControllerTests.java:104)
from spring-cloud-security.
Ping. I assume this is working now? Maybe you need the JCE extensions in the JDK?
from spring-cloud-security.
You can go ahead and close this, when I get back to the Groovy stuff I will give it another shot. Been focusing on the Java version as you know ;)
from spring-cloud-security.
Related Issues (20)
- feign has conflict with @EnableWebFluxSecurity HOT 2
- config property "security.resource.jwt.key-uri" caused UnknownHostException HOT 2
- Do you have oauth2 migration demo? HOT 3
- Spelling error in documentation
- Spring Cloud Gateway java based RouteLocator not working with Spring Cloud Security HOT 4
- Move feign and gateway code to respective projects
- Deprecate spring-cloud-starter-oauth2 and spring-cloud-starter-security HOT 2
- Can't find OAuth2RestTemplate when relay OAuth2 JWT token between resource servers. HOT 4
- TokenRelayAutoConfiguration can't find ServerOAuth2AuthorizedClientRepository HOT 1
- Use ClientId and ClientSecret for token refresh HOT 3
- TokenRelayGatewayFilterFactory is a deprecated class only in spring-cloud-security.2.2.2.RELEASE HOT 1
- If oauth2 token issued at time and system time difference is more than 60secs, necessary logs are not captured. HOT 3
- @AuthorizationServer And @Configuration HOT 4
- What project to migrate to? HOT 3
- a bean of type 'org.springframework.cloud.commons.security.AccessTokenContextRelay' that could not be found. HOT 8
- a bean of type 'org.springframework.cloud.commons.security.AccessTokenContextRelay' that could not be found. HOT 2
- Do you have oauth2 migration demo?
- Had a Error when update springboot and Springcloud from Hoxton to 2020.0.4 HOT 2
- Hibernate issue when upgrading Spring Boot from 2.5.6 to 2.6.1
- 自定义Access配置 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spring-cloud-security.