codeflare-sdk
codeflare-sdk copied to clipboard
Made ODH cert default cert for Token Auth
Issue link
What changes have been made
For TokenAuthentication the SDK will use the cert injected into a ODH/RHOAI Notebook by default in the /etc/pki/tls/custom-certs/ca-bundle.crt location
Verification steps
Setup
Required steps for ODH/RHOAI
- ODH > 2.9
- Create a Data Science Workbench
- Ensure that the path
/etc/pki/tls/custom-certs/ca-bundle.crtexists in the notebook.
Notebook server ODH
- Clone this repository with
git clone https://github.com/project-codeflare/codeflare-sdk.git - Checkout this PR's branch
- Run
poetry build- install if needed (pip install poetry) - Run
pip install --force-reinstall dist/codeflare_sdk-0.0.0.dev0-py3-none-any.whl - Restart your notebook kernel
Testing
Authenticate with TokenAuthentication.
Set the environment variable CA_CERT_PATH to the path to your cert before authenticating
auth = TokenAuthentication(
token = "XXXXX",
server = "XXXXX",
skip_tls=False
)
auth.login()
You should receive the message Authenticated with certificate located at /etc/pki/tls/custom-certs/ca-bundle.crt
You should be able to run through any demo notebook.
Checks
- [x] I've made sure the tests are passing.
- Testing Strategy
- [x] Unit tests
- [x] Manual tests
- [ ] Testing is not required for this change
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: Once this PR has been reviewed and has the lgtm label, please ask for approval from bobbins228. For more information see the Kubernetes Code Review Process.
The full list of commands accepted by this bot can be found here.
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
Whats the status of this PR? it looks like the PR with which it depends (kubeflow) on has been merged. we need this for disconnected correct?
Whats the status of this PR? it looks like the PR with which it depends (kubeflow) on has been merged. we need this for disconnected correct?
Kubeflow PR is in this is good to merge after a review and yeah pretty sure it's needed for disconnected
see #544