Bug 1013806

Summary: Vault fields need more advanced validation
Product: [JBoss] JBoss Fuse Service Works 6 Reporter: Thomas Hauser <thauser>
Component: InstallerAssignee: Thomas Hauser <thauser>
Status: CLOSED CURRENTRELEASE QA Contact: Len DiMaggio <ldimaggi>
Severity: high Docs Contact:
Priority: high    
Version: 6.0.0 GACC: atangrin, fcanas, psrna, soa-p-jira
Target Milestone: ER7   
Target Release: 6.0.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1013031 Environment:
Last Closed: 2014-02-06 15:25:07 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 1013031    
Bug Blocks:    

Comment 1 Len DiMaggio 2013-10-01 17:25:58 UTC
*** Bug 1013805 has been marked as a duplicate of this bug. ***

Comment 3 Thomas Hauser 2013-11-12 21:27:47 UTC
The vault feature now generates a new keystore for the user. Thus, validation of the existing keystore no longer needs to happen.

Comment 4 Thomas Hauser 2013-12-13 18:08:33 UTC
Since the vault is now generated, this BZ is outdated. Perhaps just verify that Vault keystores are generated? :D

Comment 5 Pavol Srna 2013-12-16 09:54:07 UTC
Hi Thomas,

how can I verify that the keystore is generated correctly? 

I tried to list the entries (`keytool -list -keystore vault.keystore`) in the generated keystore with the following error:

keytool error: java.io.IOException: Invalid keystore format

Comment 6 Thomas Hauser 2013-12-16 14:54:54 UTC
Hi Pavol,

I see this too, but only with the vault.keystore. The other keystore generated by the installer (overlord-saml.keystore) through identical means is fine: 

[[thauser] [09:49:51] configuration]$keytool -list -keystore overlord-saml.keystore
Enter keystore password:  

Keystore type: JKS
Keystore provider: SUN

Your keystore contains 1 entry

overlord, Dec 13, 2013, PrivateKeyEntry, 
Certificate fingerprint (SHA1): E6:6F:DF:18:00:BD:C4:69:64:B1:66:03:EA:3D:B4:FE:02:AB:E7:0D


I will investigate the issue further.

Comment 7 Thomas Hauser 2013-12-16 16:04:11 UTC
This is strange, because the vault is clearly functioning correctly; If it were not, the S-RAMP seeding would fail, and the server startup would fail almost immediately with vault resolution failures.

Comment 8 Thomas Hauser 2013-12-16 18:07:10 UTC
The keystore is fine, what is happening is that in creating a VaultSession with a given keystore, it is converted to the type JCEKS, while the default type for keytool is JKS:


[[thauser] [13:05:58] configuration]$keytool -list -keystore vault.keystore
keytool error: java.io.IOException: Invalid keystore format


[[thauser] [13:06:41] configuration]$keytool -list -keystore vault.keystore -storetype JCEKS
Enter keystore password:  

Keystore type: JCEKS
Keystore provider: SunJCE

Your keystore contains 1 entry

vault, Dec 16, 2013, SecretKeyEntry,

Comment 9 Pavol Srna 2013-12-17 09:10:12 UTC
Great news! Thanks for investigating, Thomas. Verified in ER7 build.