assisted-service
assisted-service copied to clipboard
NO-ISSUE: Deprecate and disable support for OCM offline token
Currently or ocm/client
package supports authentication to OCM using an offline token via the OCM_SELF_TOKEN
environment variable. But the OCM team has deprecated this authentication mechanism and will remove it in the future. The alternative is to use a client identifier and client secret, which is what we use in the SaaS environment. This patch disables by default that support, and will make the server fail with an explicit error message if it is used. Users that really need to use it will need to explicitly enable it setting the ACKNOWLEDGE_DEPRECATED_OCM_SELF_TOKEN
environment variable to yes
. In that case the server will start, but a warning will be written to the log.
List all the issues related to this PR
- [X] New Feature
- [ ] Enhancement
- [ ] Bug fix
- [ ] Tests
- [ ] Documentation
- [ ] CI/CD
What environments does this code impact?
- [ ] Automation (CI, tools, etc)
- [ ] Cloud
- [ ] Operator Managed Deployments
- [x] None
How was this code tested?
- [ ] assisted-test-infra environment
- [ ] dev-scripts environment
- [ ] Reviewer's test appreciated
- [ ] Waiting for CI to do a full test run
- [X] Manual (Elaborate on how it was tested)
- [ ] No tests needed
Checklist
- [X] Title and description added to both, commit and PR.
- [ ] Relevant issues have been associated (see CONTRIBUTING guide)
- [ ] This change does not require a documentation update (docstring,
docs
, README, etc) - [ ] Does this change include unit-tests (note that code changes require unit-tests)
Reviewers Checklist
- Are the title and description (in both PR and commit) meaningful and clear?
- Is there a bug required (and linked) for this change?
- Should this PR be backported?
@jhernand: This pull request explicitly references no jira issue.
In response to this:
Currently or
ocm/client
package supports authentication to OCM using an offline token via theOCM_SELF_TOKEN
environment variable. But the OCM team has deprecated this authentication mechanism and will remove it in the future. The alternative is to use a client identifier and client secret, which is what we use in the SaaS environment. This patch disables by default that support, and will make the server fail with an explicit error message if it is used. Users that really need to use it will need to explicitly enable it setting theACKNOWLEDGE_DEPRECATED_OCM_SELF_TOKEN
environment variable toyes
. In that case the server will start, but a warning will be written to the log.List all the issues related to this PR
- [X] New Feature
- [ ] Enhancement
- [ ] Bug fix
- [ ] Tests
- [ ] Documentation
- [ ] CI/CD
What environments does this code impact?
- [ ] Automation (CI, tools, etc)
- [ ] Cloud
- [ ] Operator Managed Deployments
- [x] None
How was this code tested?
- [ ] assisted-test-infra environment
- [ ] dev-scripts environment
- [ ] Reviewer's test appreciated
- [ ] Waiting for CI to do a full test run
- [X] Manual (Elaborate on how it was tested)
- [ ] No tests needed
Checklist
- [X] Title and description added to both, commit and PR.
- [ ] Relevant issues have been associated (see CONTRIBUTING guide)
- [ ] This change does not require a documentation update (docstring,
docs
, README, etc)- [ ] Does this change include unit-tests (note that code changes require unit-tests)
Reviewers Checklist
- Are the title and description (in both PR and commit) meaningful and clear?
- Is there a bug required (and linked) for this change?
- Should this PR be backported?
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: jhernand
The full list of commands accepted by this bot can be found here.
The pull request process is described here
- ~~OWNERS~~ [jhernand]
Approvers can indicate their approval by writing /approve
in a comment
Approvers can cancel approval by writing /approve cancel
in a comment
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 68.98%. Comparing base (
904ee71
) to head (0dcfead
). Report is 17 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #6307 +/- ##
==========================================
+ Coverage 68.29% 68.98% +0.69%
==========================================
Files 241 245 +4
Lines 35863 39450 +3587
==========================================
+ Hits 24491 27213 +2722
- Misses 9212 9813 +601
- Partials 2160 2424 +264
/retest
/test edge-e2e-metal-assisted
/lgtm
/retest-required
Remaining retests: 0 against base HEAD 4f4c46493887bed73e88b5661f4f2a503d5ccf35 and 2 for PR HEAD 0dcfeadb741e383f6463eb92d10f54e05d769ce7 in total
/retest
/retest-required
Remaining retests: 0 against base HEAD 8a63485495f366dbdf45b33c31fd0994e0c0986a and 1 for PR HEAD 0dcfeadb741e383f6463eb92d10f54e05d769ce7 in total
@jhernand: all tests passed!
Full PR test history. Your PR dashboard.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.
[ART PR BUILD NOTIFIER]
This PR has been included in build ose-agent-installer-api-server-container-v4.17.0-202405272012.p0.g5b71872.assembly.stream.el9 for distgit ose-agent-installer-api-server. All builds following this will include this PR.