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

Use OIDC auth for jenkins test user #6

Closed
soxofaan opened this issue Apr 12, 2023 · 3 comments
Closed

Use OIDC auth for jenkins test user #6

soxofaan opened this issue Apr 12, 2023 · 3 comments
Assignees

Comments

@soxofaan
Copy link
Member

Current integration tests use basic auth.

We should switch to OIDC auth, which is good test use case for client credentials (aka service accounts) because of pure machine-to-machine communication: Open-EO/openeo-python-driver#168

@soxofaan soxofaan self-assigned this Apr 12, 2023
@soxofaan soxofaan changed the title Use OIDC auth for test user Use OIDC auth for jenkins test user Apr 12, 2023
soxofaan added a commit to Open-EO/openeo-python-driver that referenced this issue Apr 18, 2023
soxofaan added a commit that referenced this issue Apr 28, 2023
Jenkins run env apparently has some authenticated vault user already, preventing the desired `openeo` user to access `TAP/big_data_services/openeo/jenkins-service-account`
soxofaan added a commit that referenced this issue Apr 28, 2023
…nkins

Don't do Vault logic from test suite itself
handle this in Jenkinsfile (through vault support in jenkinslib)
and pass through with env vars
soxofaan added a commit that referenced this issue Apr 28, 2023
soxofaan added a commit that referenced this issue May 2, 2023
@soxofaan
Copy link
Member Author

soxofaan commented May 4, 2023

fully switched auth in integration tests to client credentials

@soxofaan
Copy link
Member Author

openeo python client 0.18.0 now has client credentials support from con.authenticate_oidc, so better switch to that instead of custom implementation

@soxofaan soxofaan reopened this May 31, 2023
soxofaan added a commit that referenced this issue May 31, 2023
…ntials support

(since openeo python client 0.18.0)

#6
@soxofaan
Copy link
Member Author

done

bossie pushed a commit that referenced this issue Mar 12, 2024
def test_auth_jenkins_oidc_client_credentials_me(connection, auth_connection):
        """
        WIP for #6: OIDC Client Credentials auth for jenkins user
        """
        # TODO: skip this test automatically when not running in Jenkins context?
        me = connection.describe_account()
        _log.info(f"connection.describe_account -> {me=}")
>       assert me["user_id"] == "openeo-jenkins-service-account"
E       AssertionError: assert 1ff4f5cf-95c...-b5096d95006a == openeo-jenki...rvice-account
E
E         - openeo-jenkins-service-account
E         + 1ff4f5cf-95cc-4bbb-ad8f-b5096d95006a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant