Hi Brian, yes I have used the Crypto utils to encrypt my password for SO. But it still fails during the decryption phase :
2019-06-05T12:44:39.790Z|| org.onap.so.openstack.utils.MsoHeatUtils - Found: CloudIdentity[id=REGION_THREE_KEYSTONE,identityUrl=http://163.162.95.137:5000/v3,msoId=dc1,projectDomain=datacenter1,userDomain=Default,adminTenant=34f1fe41d1a0483dbd1aa94c26dc5545,memberRole=admin,tenantMetadata=<null>,identityServerType=KEYSTONE_V3,identityAuthenticationType=USERNAME_PASSWORD] 2019-06-05T12:44:39.790Z|| org.onap.so.openstack.utils.MsoHeatUtils - keystoneUrl=http://163.162.95.137:5000/v3 2019-06-05T12:44:39.948Z|| org.onap.so.utils.CryptoUtils - RA_GENERAL_EXCEPTION 500 Exception in encryptPassword javax.crypto.AEADBadTagException: Input too short - need tag *at com.sun.crypto.provider.GaloisCounterMode.decryptFinal(GaloisCounterMode.java:531)* at com.sun.crypto.provider.CipherCore.finalNoPadding(CipherCore.java:1116) at com.sun.crypto.provider.CipherCore.fillOutputBuffer(CipherCore.java:1053) at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:853) at com.sun.crypto.provider.AESCipher.engineDoFinal(AESCipher.java:446) at javax.crypto.Cipher.doFinal(Cipher.java:2222) *at org.onap.so.utils.CryptoUtils.decrypt(CryptoUtils.java:84)* *at org.onap.so.utils.CryptoUtils.decryptCloudConfigPassword(CryptoUtils.java:100)* at org.onap.so.cloud.authentication.AuthenticationMethodFactory.getAuthenticationForV3(AuthenticationMethodFactory.java:78) at org.onap.so.cloud.authentication.KeystoneV3Authentication.getToken(KeystoneV3Authentication.java:70) at org.onap.so.openstack.utils.MsoHeatUtils.getHeatClient(MsoHeatUtils.java:855) at org.onap.so.openstack.utils.MsoHeatUtils.queryStack(MsoHeatUtils.java:502) at org.onap.so.adapters.vnf.MsoVnfAdapterImpl.createVfModule(MsoVnfAdapterImpl.java:653) at org.onap.so.adapters.vnf.MsoVnfAdapterImpl$$FastClassBySpringCGLIB$$8b1f101c.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:746) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:294) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688) at org.onap.so.adapters.vnf.MsoVnfAdapterImpl$$EnhancerBySpringCGLIB$$96ee322.createVfModule(<generated>) at org.onap.so.adapters.vnf.VnfAdapterRest$CreateVfModuleTask.run(VnfAdapterRest.java:362) I have tested my encrypted password by running the decrypt method at : https://gerrit.onap.org/r/gitweb?p=so.git;a=blob_plain;f=common/src/main/java/org/onap/so/utils/CryptoUtils.java;h=09b48d266fa7df0751d73fc33db45125fc095483;hb=refs/heads/dublin And it works. Here my override.yaml file for SO: so: enabled: true replicaCount: 1 liveness: # necessary to disable liveness probe when setting breakpoints # in debugger so K8s doesn't restart unresponsive container enabled: false # so server configuration config: # message router configuration dmaapTopic: "AUTO" # openstack configuration openStackRegion: "RegionOne" openStackServiceTenantName: "service" openStackUserName: "dc1" openStackKeyStoneUrl: "http://163.162.95.137:5000" openStackEncryptedPasswordHere: "0D280890C50311D38D95A4C9CC98D9798E8B8A65AF2A20395648ECE5981D9B1C0BD091D8C812E8" openStackKeystoneAPIVersion: "v3" openStackProjectName: "datacenter1" # configure embedded mariadb mariadb: config: mariadbRootPassword: password so-catalog-db-adapter: config: openStackUserName: "dc1" openStackKeyStoneUrl: "http://163.162.95.137:5000" openStackEncryptedPasswordHere: "0D280890C50311D38D95A4C9CC98D9798E8B8A65AF2A20395648ECE5981D9B1C0BD091D8C812E8" openStackKeystoneAPIVersion: "v3" openStackProjectName: "datacenter1" My doubt is that in the SO, there is still the old password and so the decryption method fails. Where is the file into SO that contains the encryption key? Aniello Paolo Malinconico -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#17443): https://lists.onap.org/g/onap-discuss/message/17443 Mute This Topic: https://lists.onap.org/mt/31925775/21656 Group Owner: [email protected] Unsubscribe: https://lists.onap.org/g/onap-discuss/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
