Skip to content

feat: expose service-info setting in the chart - #217

Merged
uniqueg merged 3 commits into
devfrom
feat/service-info-public
Nov 6, 2026
Merged

uniqueg merged 3 commits into
devfrom
feat/service-info-public

Conversation

@uniqueg

@uniqueg uniqueg commented Nov 5, 2026 •

Copy link
Copy Markdown
Member

Summary

Closes #216.

auth.service_info_public (default true, snake_case as the other auth values) sets TESK_API_SERVICE_INFO_PUBLIC for tesk-api. false requires a token for GET /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.yaml and the chart's README say. The default image stays 1.1.0 until 1.2.0 is 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=false renders "false", null renders nothing. helm lint passes. The chart has no template tests, and no cluster was touched.

Declined review findings

  • A test harness for the chart: out of scope for this value; the repository has none.

🤖 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:

  • Expose an optional chart setting to control whether authenticated deployments leave the /service-info endpoint publicly accessible.

Documentation:

  • Document the new service-info access setting, its compatibility with tesk-api 1.2.0+, and its behavior across authentication modes.

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 the v* tag (#222), and tag v0.1.2 exists already. elixir-cloud-aai/tesk-api#69 is merged.

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]>
@sourcery-ai

sourcery-ai Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

The chart now exposes auth.service_info_public, propagating non-null values to tesk-api through TESK_API_SERVICE_INFO_PUBLIC, with documentation covering defaults, authentication behavior, and the tesk-api 1.2.0 compatibility requirement; the chart version is bumped to 0.1.2.

File-Level Changes

Change Details Files
Expose the tesk-api service-info access policy as a configurable Helm value and environment variable.
  • Add auth.service_info_public with a default of true.
  • Render TESK_API_SERVICE_INFO_PUBLIC for non-null values, quoting the configured value and omitting the variable when null.
  • Preserve behavior across authentication modes and allow application-side validation of non-boolean values.
charts/tesk/values.yaml
charts/tesk/templates/common/tesk-deployment.yaml
Document the setting’s compatibility requirements and user-visible behavior.
  • Describe public versus token-protected /service-info access and the noauth interaction.
  • Note the requirement for tesk-api 1.2.0 or later and that earlier images ignore the setting.
  • Link to the upstream authentication documentation.
charts/tesk/README.md
Publish the chart as a new patch version.
  • Bump the chart version from 0.1.1 to 0.1.2.
charts/tesk/Chart.yaml

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@uniqueg
uniqueg marked this pull request as ready for review November 5, 2026 05:07

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Comment thread charts/tesk/README.md Resolved
uniqueg and others added 2 commits November 6, 2026 06:04
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]>
@uniqueg
uniqueg merged commit 8c6ba82 into dev Nov 6, 2026
20 checks passed
@uniqueg
uniqueg deleted the feat/service-info-public branch November 6, 2026 05:09
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

Successfully merging this pull request may close these issues.

Make service-info public by default, configurable

1 participant