Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add password_cipher_mode to encrypt password. #1415

Open
wants to merge 1 commit into
base: 9.8-stable
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions f5_openstack_agent/lbaasv2/drivers/bigip/agent_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,11 @@
default=60,
help=(
'Amount of time to wait for a errored service to become active')
),
cfg.BoolOpt(
'password_cipher_mode',
default=False,
help='The flag indicating the password is plain text or not.'
)
]

Expand Down
7 changes: 7 additions & 0 deletions f5_openstack_agent/lbaasv2/drivers/bigip/icontrol_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
# limitations under the License.
#

import base64
import datetime
import hashlib
import json
Expand Down Expand Up @@ -389,6 +390,12 @@ def __init__(self, conf, registerOpts=True):
self.pool_manager = resource_helper.BigIPResourceHelper(
resource_helper.ResourceType.pool)

if self.conf.password_cipher_mode:
self.conf.icontrol_password = \
base64.b64decode(self.conf.icontrol_password)
if self.conf.os_password:
self.conf.os_password = base64.b64decode(self.conf.os_password)

try:

# debug logging of service requests recieved by driver
Expand Down