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 management command to dump auth config data to a file #2082

Merged
merged 10 commits into from
Mar 1, 2024

Conversation

bmclaughlin
Copy link
Contributor

@bmclaughlin bmclaughlin commented Feb 22, 2024

Gateway JIRA issue: https://issues.redhat.com/browse/AAP-19981
No-Issue

Example output from management command from Keycloak environment:

# cat auth_config.json 
[
    {
        "type": "galaxy.authentication.authenticator_plugins.keycloak",
        "enabled": true,
        "configuration": {
            "ACCESS_TOKEN_URL": "http://keycloak:8080/auth/realms/aap/protocol/openid-connect/token/",
            "AUTHORIZATION_URL": "http://localhost:8080/auth/realms/aap/protocol/openid-connect/auth/",
            "KEY": "automation-hub",
            "PUBLIC_KEY": "<really_long_public_key_was_here>",
            "SECRET": "REALLYWELLKEPTSECRET"
        }
    },
    {
        "type": "galaxy.authentication.authenticator_plugins.ldap",
        "enabled": false,
        "configuration": {
            "SERVER_URI": null,
            "BIND_DN": null,
            "BIND_PASSWORD": null,
            "USER_DN_TEMPLATE": null,
            "USER_SEARCH": null,
            "USER_SEARCH_BASE_DN": null,
            "USER_SEARCH_SCOPE": null,
            "USER_SEARCH_FILTER": null,
            "GROUP_SEARCH": null,
            "GROUP_SEARCH_BASE_DN": null,
            "GROUP_SEARCH_SCOPE": null,
            "GROUP_SEARCH_FILTER": null,
            "GROUP_TYPE": null,
            "GROUP_TYPE_PARAMS": null,
            "USER_ATTR_MAP": null
        }
    }

Example output from management command from LDAP environment:

# cat auth_config.json 
[
    {
        "type": "galaxy.authentication.authenticator_plugins.keycloak",
        "enabled": false,
        "configuration": {
            "ACCESS_TOKEN_URL": null,
            "AUTHORIZATION_URL": null,
            "KEY": null,
            "PUBLIC_KEY": null,
            "SECRET": null
        }
    },
    {
        "type": "galaxy.authentication.authenticator_plugins.ldap",
        "enabled": false,
        "configuration": {
            "SERVER_URI": "ldap://ldap:10389",
            "BIND_DN": "cn=admin,dc=planetexpress,dc=com",
            "BIND_PASSWORD": "GoodNewsEveryone",
            "USER_DN_TEMPLATE": null,
            "USER_SEARCH_BASE_DN": "ou=people,dc=planetexpress,dc=com",
            "USER_SEARCH_SCOPE": "SUBTREE",
            "USER_SEARCH_FILTER": "(uid=%(user)s)",
            "GROUP_SEARCH_BASE_DN": "ou=people,dc=planetexpress,dc=com",
            "GROUP_SEARCH_SCOPE": "SUBTREE",
            "GROUP_SEARCH_FILTER": "(objectClass=Group)",
            "GROUP_TYPE_PARAMS": null,
            "USER_ATTR_MAP": {
                "email": "mail",
                "last_name": "sn",
                "first_name": "givenName"
            },
            "CONNECTION_OPTIONS": {},
            "START_TLS": null,
            "USER_SEARCH": [
                "ou=people,dc=planetexpress,dc=com",
                "SUBTREE",
                "(uid=%(user)s)"
            ],
            "GROUP_SEARCH": [
                "ou=people,dc=planetexpress,dc=com",
                "SUBTREE",
                "(objectClass=Group)"
            ],
            "GROUP_TYPE": "GroupOfNamesType"
        }
    }

@github-actions github-actions bot added backport-4.2 This PR should be backported to stable-4.2 (1.2) backport-4.4 This PR should be backported to stable-4.4 (2.1) backport-4.5 This PR should be backported to stable-4.5 (2.2) backport-4.6 This PR should be backported to stable-4.6 (2.3) backport-4.7 This PR should be backported to stable-4.7 (2.4) backport-4.8 This PR should be backported to stable-4.8 (2.4) backport-4.9 This PR should be backported to stable-4.9 (2.4) labels Feb 22, 2024
@bmclaughlin bmclaughlin removed backport-4.2 This PR should be backported to stable-4.2 (1.2) backport-4.4 This PR should be backported to stable-4.4 (2.1) backport-4.5 This PR should be backported to stable-4.5 (2.2) backport-4.6 This PR should be backported to stable-4.6 (2.3) backport-4.7 This PR should be backported to stable-4.7 (2.4) backport-4.8 This PR should be backported to stable-4.8 (2.4) backport-4.9 This PR should be backported to stable-4.9 (2.4) labels Feb 22, 2024
@bmclaughlin bmclaughlin force-pushed the add-dump-auth-config-cmd branch from 8366f48 to 7fbed1e Compare February 22, 2024 18:38
@bmclaughlin bmclaughlin marked this pull request as ready for review February 22, 2024 20:59
@bmclaughlin bmclaughlin force-pushed the add-dump-auth-config-cmd branch from 1f8cce1 to c600f81 Compare February 27, 2024 21:55
@bmclaughlin bmclaughlin force-pushed the add-dump-auth-config-cmd branch from 5232f9c to e0c0b73 Compare March 1, 2024 15:41
No-Issue
@newswangerd newswangerd merged commit 67eab54 into ansible:master Mar 1, 2024
25 of 28 checks passed
@bmclaughlin bmclaughlin deleted the add-dump-auth-config-cmd branch March 1, 2024 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants