Merge pull request #5390 from ryanpetrello/downstream-security

merge in a few downstream fixes

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
softwarefactory-project-zuul[bot] 2019-11-25 15:38:25 +00:00 committed by GitHub
commit deb8714987
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 24 additions and 7 deletions

View File

@ -0,0 +1,21 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
def _cleanup_license_setting(apps, schema_editor):
Setting = apps.get_model('conf', 'Setting')
for license in Setting.objects.filter(key='LICENSE').all():
for k in ('rh_username', 'rh_password'):
license.value.pop(k, None)
license.save()
class Migration(migrations.Migration):
dependencies = [
('main', '0098_v360_rename_cyberark_aim_credential_type'),
]
operations = [migrations.RunPython(_cleanup_license_setting)]

View File

@ -6,7 +6,7 @@ from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('main', '0098_v360_rename_cyberark_aim_credential_type'),
('main', '0099_v361_license_cleanup'),
]
operations = [

View File

@ -187,10 +187,6 @@ export default
payload = $scope.newLicense.file;
} else if ($scope.selectedLicense.fullLicense) {
payload = $scope.selectedLicense.fullLicense;
if ($scope.rhCreds.username && $scope.rhCreds.password) {
payload.rh_password = $scope.rhCreds.password;
payload.rh_username = $scope.rhCreds.username;
}
}
CheckLicense.post(payload, $scope.newLicense.eula)

View File

@ -17,7 +17,7 @@ The preferred mechanism for authenticating with AWX and |RHAT| is by generating
TOWER_PASSWORD=secret \
awx login
As a convenience, the ``awx login -h human`` command prints a shell-formatted token
As a convenience, the ``awx login -f human`` command prints a shell-formatted token
value:
.. code:: bash
@ -30,7 +30,7 @@ specify your username and password each time:
.. code:: bash
export TOWER_HOST=https://awx.example.org
$(TOWER_USERNAME=alice TOWER_PASSWORD=secret awx login -h)
$(TOWER_USERNAME=alice TOWER_PASSWORD=secret awx login -f human)
awx config
Working with OAuth2.0 Applications