Comment 0 for bug 1999665

Revision history for this message
Alejandro Santoyo Gonzalez (al3jandrosg) wrote :

After a stack is created using:

openstack stack create --parameter password=test123 -t simple_instance.yaml -e params.yaml my_simple_stack

where 'simple_instance.yaml' defines a simple VM with a 'hidden'
parameter as below:

  password:
    type: string
    hidden: true
    description: The password

'hidden' is honored when you run:

openstack stack show my_simple_stack | grep password
| | password: '******'

but that's not the case for the below command as the API returns the
'hidden' parameter in plain text:

openstack stack environment show my_simple_stack3 | grep password
  password: test123

This behavior is observed in Focal/Ussuri and Jammy/Yoga and happens
regardless of the user role used. Namely two users with either reader
or member (admin role as well but this may be by design) face the same
issue. For example, if user1 created the stack, both user1 and user2
(a user with either reader or admin role assigned) face the same issue
described above.

Also it doesn't matter if heat.conf contains
'encrypt_parameters_and_properties = true', the issue is observed
regardles of the value for this parameter.

Reproducer:
-----------

1. Create a simple stack where a 'hidden' parameter is used
2. Run 'openstack stack show <stack-id>', the hidden parameter will
appear masked.
3. Run 'openstack stack environment show <stack-id>' the hidden
parameter will appear in plain text.
4. Add 'encrypt_parameters_and_properties = true' to heat.conf and
restart the heat services
5. Repeat steps 1-3, issue should be reproduced
6. Set option in step 4 as 'false' and repeat steps 1-3, issue should
be reproduced