From f562dd497680a7b1a9c6b52be02039dbbd29bf68 Mon Sep 17 00:00:00 2001 From: jessicamack Date: Wed, 2 Oct 2024 08:49:47 -0400 Subject: [PATCH] update requirements, add migrations --- .../migrations/0011_remove_saml_auth_conf.py | 40 ++++++++++++ .../0004_alter_userenterpriseauth_provider.py | 18 ++++++ licenses/lxml.txt | 63 ------------------- licenses/xmlsec.txt | 21 ------- requirements/requirements.txt | 7 --- 5 files changed, 58 insertions(+), 91 deletions(-) create mode 100644 awx/conf/migrations/0011_remove_saml_auth_conf.py create mode 100644 awx/sso/migrations/0004_alter_userenterpriseauth_provider.py delete mode 100644 licenses/lxml.txt delete mode 100644 licenses/xmlsec.txt diff --git a/awx/conf/migrations/0011_remove_saml_auth_conf.py b/awx/conf/migrations/0011_remove_saml_auth_conf.py new file mode 100644 index 000000000000..83c4fd3c469b --- /dev/null +++ b/awx/conf/migrations/0011_remove_saml_auth_conf.py @@ -0,0 +1,40 @@ +# Generated by Django 4.2.10 on 2024-08-27 14:20 + +from django.db import migrations + +SAML_AUTH_CONF_KEYS = [ + 'SAML_AUTO_CREATE_OBJECTS', + 'SOCIAL_AUTH_SAML_CALLBACK_URL', + 'SOCIAL_AUTH_SAML_METADATA_URL', + 'SOCIAL_AUTH_SAML_SP_ENTITY_ID', + 'SOCIAL_AUTH_SAML_SP_PUBLIC_CERT', + 'SOCIAL_AUTH_SAML_SP_PRIVATE_KEY', + 'SOCIAL_AUTH_SAML_ORG_INFO', + 'SOCIAL_AUTH_SAML_TECHNICAL_CONTACT', + 'SOCIAL_AUTH_SAML_SUPPORT_CONTACT', + 'SOCIAL_AUTH_SAML_ENABLED_IDPS', + 'SOCIAL_AUTH_SAML_SECURITY_CONFIG', + 'SOCIAL_AUTH_SAML_SP_EXTRA', + 'SOCIAL_AUTH_SAML_EXTRA_DATA', + 'SOCIAL_AUTH_SAML_ORGANIZATION_MAP', + 'SOCIAL_AUTH_SAML_TEAM_MAP', + 'SOCIAL_AUTH_SAML_ORGANIZATION_ATTR', + 'SOCIAL_AUTH_SAML_TEAM_ATTR', + 'SOCIAL_AUTH_SAML_USER_FLAGS_BY_ATTR', +] + + +def remove_saml_auth_conf(apps, scheme_editor): + setting = apps.get_model('conf', 'Setting') + setting.objects.filter(key__in=SAML_AUTH_CONF_KEYS).delete() + + +class Migration(migrations.Migration): + + dependencies = [ + ('conf', '0010_change_to_JSONField'), + ] + + operations = [ + migrations.RunPython(remove_saml_auth_conf), + ] diff --git a/awx/sso/migrations/0004_alter_userenterpriseauth_provider.py b/awx/sso/migrations/0004_alter_userenterpriseauth_provider.py new file mode 100644 index 000000000000..8479a9c749b0 --- /dev/null +++ b/awx/sso/migrations/0004_alter_userenterpriseauth_provider.py @@ -0,0 +1,18 @@ +# Generated by Django 4.2.10 on 2024-10-02 12:44 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('sso', '0003_convert_saml_string_to_list'), + ] + + operations = [ + migrations.AlterField( + model_name='userenterpriseauth', + name='provider', + field=models.CharField(choices=[('radius', 'RADIUS'), ('tacacs+', 'TACACS+')], max_length=32), + ), + ] diff --git a/licenses/lxml.txt b/licenses/lxml.txt deleted file mode 100644 index 76c02ef80751..000000000000 --- a/licenses/lxml.txt +++ /dev/null @@ -1,63 +0,0 @@ -lxml is copyright Infrae and distributed under the BSD license (see -doc/licenses/BSD.txt), with the following exceptions: - -Some code, such a selftest.py, selftest2.py and -src/lxml/_elementpath.py are derived from ElementTree and -cElementTree. See doc/licenses/elementtree.txt for the license text. - -lxml.cssselect and lxml.html are copyright Ian Bicking and distributed -under the BSD license (see doc/licenses/BSD.txt). - -test.py, the test-runner script, is GPL and copyright Shuttleworth -Foundation. See doc/licenses/GPL.txt. It is believed the unchanged -inclusion of test.py to run the unit test suite falls under the -"aggregation" clause of the GPL and thus does not affect the license -of the rest of the package. - -The doctest.py module is taken from the Python library and falls under -the PSF Python License. - -The isoschematron implementation uses several XSL and RelaxNG resources: - * The (XML syntax) RelaxNG schema for schematron, copyright International - Organization for Standardization (see - src/lxml/isoschematron/resources/rng/iso-schematron.rng for the license - text) - * The skeleton iso-schematron-xlt1 pure-xslt schematron implementation - xsl stylesheets, copyright Rick Jelliffe and Academia Sinica Computing - Center, Taiwan (see the xsl files here for the license text: - src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/) - * The xsd/rng schema schematron extraction xsl transformations are unlicensed - and copyright the respective authors as noted (see - src/lxml/isoschematron/resources/xsl/RNG2Schtrn.xsl and - src/lxml/isoschematron/resources/xsl/XSD2Schtrn.xsl) - -doc/licenses/BSD.txt: -Copyright (c) 2004 Infrae. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - - 3. Neither the name of Infrae nor the names of its contributors may - be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INFRAE OR -CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/xmlsec.txt b/licenses/xmlsec.txt deleted file mode 100644 index 89ba0cdd01d8..000000000000 --- a/licenses/xmlsec.txt +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Ryan Leckey - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/requirements/requirements.txt b/requirements/requirements.txt index 2838fb6e15f1..d728e555d550 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -229,7 +229,6 @@ isodate==0.6.1 # azure-keyvault-keys # azure-keyvault-secrets # msrest - # python3-saml jaraco-collections==5.0.0 # via irc jaraco-context==4.3.0 @@ -265,10 +264,6 @@ kubernetes==29.0.0 # via openshift lockfile==0.12.2 # via python-daemon -lxml==4.9.4 - # via - # python3-saml - # xmlsec markdown==3.5.2 # via -r /awx_devel/requirements/requirements.in markupsafe==2.1.5 @@ -570,8 +565,6 @@ wrapt==1.16.0 # via # deprecated # opentelemetry-instrumentation -xmlsec==1.3.13 - # via python3-saml yarl==1.9.4 # via aiohttp zipp==3.17.0