Repository navigation
feat: expose service-info setting in the chart - #217
Merged
Merged
Conversation
auth.service_info_public: false requires a token for GET /service-info. Needs tesk-api 1.2.0 or later; earlier versions ignore it. Closes #216 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThe chart now exposes File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
uniqueg
marked this pull request as ready for review
November 5, 2026 05:07
Contributor
There was a problem hiding this comment.
Hey - I've found 4 issues
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="charts/tesk/templates/common/tesk-deployment.yaml" line_range="67" />
<code_context>
value: {{ .Values.auth.mode }}
+ {{- if not (kindIs "invalid" .Values.auth.service_info_public) }}
+ - name: TESK_API_SERVICE_INFO_PUBLIC
+ value: {{ .Values.auth.service_info_public | quote }}
+ {{- end }}
</code_context>
<issue_to_address>
**Service info stays public**
When an operator sets `auth.service_info_public=false` and leaves the chart's default `tesk.image` unchanged, the default `tesk-api` 1.1.0 image ignores `TESK_API_SERVICE_INFO_PUBLIC`, so unauthenticated callers can still fetch `/service-info`, including the configured FTP endpoint.
Set the chart's default `tesk.image` to tesk-api 1.2.0 or later, which honors `TESK_API_SERVICE_INFO_PUBLIC`.
</issue_to_address>
### Comment 2
<location path="charts/tesk/templates/common/tesk-deployment.yaml" line_range="66-67" />
<code_context>
- name: SPRING_PROFILES_ACTIVE
value: {{ .Values.auth.mode }}
+ {{- if not (kindIs "invalid" .Values.auth.service_info_public) }}
+ - name: TESK_API_SERVICE_INFO_PUBLIC
+ value: {{ .Values.auth.service_info_public | quote }}
+ {{- end }}
</code_context>
<issue_to_address>
**Public access persists during rollout**
When an upgrade changes `auth.service_info_public` from `true` to `false` while the Service is receiving unauthenticated requests, the old `tesk-api` pod keeps its previous public setting while Kubernetes starts the replacement, and the `tesk-api` Service can route requests to either pod. Unauthenticated requests therefore still reach `/service-info` until the old pod is removed; a replacement that never becomes ready prolongs that exposure.
Use an update strategy that removes the old pod from service before allowing requests to reach the replacement, such as `Recreate` if the availability tradeoff is acceptable.
</issue_to_address>
### Comment 3
<location path="charts/tesk/templates/common/tesk-deployment.yaml" line_range="66-68" />
<code_context>
- name: SPRING_PROFILES_ACTIVE
value: {{ .Values.auth.mode }}
+ {{- if not (kindIs "invalid" .Values.auth.service_info_public) }}
+ - name: TESK_API_SERVICE_INFO_PUBLIC
+ value: {{ .Values.auth.service_info_public | quote }}
+ {{- end }}
{{ if .Values.transfer.active }}
</code_context>
<issue_to_address>
**Missing access behavior tests**
The chart now passes the setting to tesk-api, but the change adds no tests covering public and protected service-info access with and without a token.
</issue_to_address>
### Comment 4
<location path="charts/tesk/README.md" line_range="77" />
<code_context>
| transfer.pvc_name | string | |
| auth.mode | string | Can be 'noauth' to disable authentication, or 'auth' to enable it |
| auth.env_subgroup | string | Can be 'EBI' or 'CSC' |
+| auth.service_info_public | boolean | With `auth.mode` 'auth': `true` (default) lets `GET /service-info` answer without a token, `false` requires a valid token for it. Needs tesk-api 1.2.0 or later (`tesk.image`); earlier versions ignore it and keep the endpoint public. No effect with 'noauth', where all endpoints are open. See [`auth.md`](https://github.com/elixir-cloud-aai/tesk-api/blob/master/auth.md#public-endpoints) |
| service.type | string | Can be 'NodePort' or 'ClusterIp' or 'LoadBalancer' |
| service.node_port | integer | Only used if service.type is 'NodePort', specifies the port |
</code_context>
<issue_to_address>
**Authentication docs not updated**
The chart README documents the setting, but the PR only links to the authentication documentation; it does not update that documentation to describe the default and setting.
</issue_to_address>Linked issues
#216 Make service-info public by default, configurable · 2 of 4 met
| # | Requirement | Status | Notes |
|---|---|---|---|
| 1 | GET /service-info answers without a token by default, including when authentication is enabled for other routes. | ✅ Met | The chart defaults the setting to true and passes it to the API; the existing 1.1.0 image is documented as keeping the endpoint public. |
| 2 | A documented setting lets deployers require a token for GET /service-info through the Helm chart. | ✅ Met | The chart exposes and documents auth.service_info_public, and forwards it as TESK_API_SERVICE_INFO_PUBLIC; the docs note that this requires tesk-api 1.2.0 or later. |
| 3 | Tests cover both settings, with and without a token. | ❌ Not addressed | The diff adds no tests for either setting or token behavior. |
| 4 | The deployment and authentication docs describe the default and the setting. | 🟡 Partly met | The chart README and values comments describe the setting, but the existing deployment guide and linked authentication documentation are not updated in this PR. |
Sourcery assessment
Approval pending. 4 findings to address first.
Blocking findings: charts/tesk/templates/common/tesk-deployment.yaml:67, charts/tesk/templates/common/tesk-deployment.yaml:67, charts/tesk/templates/common/tesk-deployment.yaml:68, charts/tesk/README.md:77
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The chart version is set in the release-prep pull request, together with the release tag (vX.Y.Z = chart X.Y.Z); 0.1.2 can not be released under that scheme, as tag v0.1.2 exists. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Nov 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #216.
auth.service_info_public(defaulttrue, snake_case as the otherauthvalues) setsTESK_API_SERVICE_INFO_PUBLICfortesk-api.falserequires a token forGET /service-info; other values go to the app as they are, where an invalid one stops the start instead of leaving the endpoint open.The setting needs tesk-api 1.2.0 or later (elixir-cloud-aai/tesk-api#62); earlier versions ignore it, which
values.yamland the chart's README say. The default image stays1.1.0until1.2.0is published. Merge after the tesk-api PR, as the README links to its docs.Verified
helm template(3.19): default renders"true",--set auth.service_info_public=falserenders"false",nullrenders nothing.helm lintpasses. The chart has no template tests, and no cluster was touched.Declined review findings
🤖 Generated with Claude Code
Summary by Sourcery
Add a Helm chart setting for configuring public access to the tesk-api service-info endpoint.
New Features:
/service-infoendpoint publicly accessible.Documentation:
Update 2026-11-06: merged
dev(with the new CI) into this branch; CI is green. The chart version bump to 0.1.2 is reverted: the release-prep PR sets the version, together with thev*tag (#222), and tagv0.1.2exists already. elixir-cloud-aai/tesk-api#69 is merged.