Bug 1328532

Summary: Setup CLI operation should fail if vault is not found in configuration
Product: [JBoss] JBoss Operations Network Reporter: Vojta Prusa <vprusa>
Component: Plugin -- JBoss EAP 7Assignee: Josejulio Martínez <jmartine>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: medium Docs Contact:
Priority: medium    
Version: JON 3.3.5CC: fbrychta, jmartine, loleary, spinder
Target Milestone: CR01Keywords: Triaged
Target Release: One-off release   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1328540 (view as bug list) Environment:
JON with EAP7 server resource imported from Discovery Queue
Last Closed: 2018-02-16 10:02:20 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:    
Bug Blocks: 1387292    

Description Vojta Prusa 2016-04-19 15:19:29 UTC
Description of problem:
In JON when executing "Setup CLI" operation on EAP resource with parameters:
Default Controller: true
Security: true
Store Password Method: VAULT

Without configured Vault operation should fail according to note:
 VAULT - Reads truststore/keystore passwords from server configuration file (ie. standalone.xml). Passwords must be obfuscated by vault. Vault must also be defined in server configuration file. If vault is not found, this operations results in Failure. Note that vaults in jboss-cli.xml were introduced in EAP 6.3, this operation will fail for earlier versions. 

Operation should fail but it is successful.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Servers - Top level -> EAP 7 (0.0.0.0:8443) -> Inventory -> Operations
2. Setup CLI ...
Default Controller: true
Security: true
Store Password Method: VAULT
3. Schedule - now

Actual results:
Setting up Default Controller
Security skipped: Vault definition was not found in server configuration file
Wrote changes to /home/hudson/jboss-eap7-standalone/bin/jboss-cli.xml

Expected results:
Failure

Additional info:

Comment 5 Josejulio Martínez 2017-11-01 16:14:48 UTC
commit f5cc2856a46aa9e2138215005cee32cf6c492b86
Merge: 704076e a79c738
Author: Michael Burman <yak>
Date:   Wed Nov 1 16:39:17 2017 +0200

    Merge pull request #334 from josejulio/bugs/1328532
    
    Bug 1328532 - Fail when trying to secure setup CLI with an incompatib…

commit a79c738821d099d6e58dee9a2b4e5fbcbf6e9770
Author: Josejulio Martínez <jmartine>
Date:   Tue Oct 31 16:29:26 2017 -0600

    Bug 1328532 - Fail when trying to secure setup CLI with an incompatible setup
    
    Setup CLI operation will fail in the following cases:
    
    Store Password Method: Plain
      1) Truststore path is not set
      2) Secure connection is not enabled
    Store Password Method: Vault
      3) Vault definition was not found in server configuration file
      4) Could not find ssl configuration for management interface
      5) Cannot store truststore passwords using vault, because it is not supported by this version of EAP

Comment 10 Filip Brychta 2017-11-21 15:38:33 UTC
Verified following:
- operation still works correctly for plain
- operation works for vault
- operation fails with correct msgs when vault is used but not configured on EAP side