Skip to content

feat: Expose the OIDC JWKS tunables through the operator - #6690

Open
larrysingleton007 wants to merge 3 commits into
feast-dev:masterfrom
larrysingleton007:feat/operator-jwks-tunables
Open

feat: Expose the OIDC JWKS tunables through the operator#6690
larrysingleton007 wants to merge 3 commits into
feast-dev:masterfrom
larrysingleton007:feat/operator-jwks-tunables

Conversation

@larrysingleton007

Copy link
Copy Markdown
Contributor

What this PR does / why we need it

Follow-up to #6683, which you asked for in that review. #6683 added jwks_cache_lifespan_seconds and jwks_request_timeout_seconds to OidcAuthConfig; this exposes them through the operator so they are reachable from a FeatureStore CR.

They are added as CR fields on OidcAuthz rather than OIDC Secret keys, because they are non-secret operational knobs and belong with verifySSL and caCertConfigMap rather than in the Secret that carries IdP credentials. Wiring follows the existing VerifySSL pattern.

authz:
  oidc:
    secretRef:
      name: oidc-secret
    jwksCacheLifespanSeconds: 300
    jwksRequestTimeoutSeconds: 10

Both are optional pointers with a Minimum=1 constraint mirroring the SDK's validation, and both are omitted from the generated feature_store.yaml when unset so the SDK's own defaults apply rather than the operator asserting a competing set.

Worth flagging for review: jwksCacheLifespanSeconds is not purely a performance setting. It also bounds how long a key the provider has revoked continues to validate tokens, so the docs describe that tradeoff rather than presenting it as a throughput dial.

Regenerated artifacts: deepcopy, CRD bases, dist/install.yaml, the API reference, and the OLM bundle. The bundle is a separate make bundle step that make manifests does not cover and no PR workflow runs, so it is easy to miss; without it an OLM install silently prunes the new fields rather than failing.

Testing: unit coverage asserts the keys are absent when unset and forwarded with correct values when set, plus that the client config omits them (it inherits the same strict validation). CRD validation tests cover the Minimum=1 constraints. go build ./..., gofmt, and all four operator test packages pass.

One docs fix included: the caCertConfigMap example in the same block was written as a bare string, but the CRD requires an object with a name key, so that snippet failed to apply as written.

Which issue(s) this PR fixes

Fixes #6686

Follow-up to feast-dev#6683, requested in its review. Add jwksCacheLifespanSeconds
and jwksRequestTimeoutSeconds to OidcAuthz as CR fields rather than OIDC
Secret keys: these are non-secret operational knobs, so they belong with
verifySSL and caCertConfigMap rather than in the Secret bag that carries
IdP-coupled credentials.

Both are optional pointers with a Minimum=1 constraint mirroring the
SDK's validation, and are omitted from the generated feature_store.yaml
when unset so the SDK defaults apply rather than the operator asserting
its own. Regenerates deepcopy, CRD bases, dist/install.yaml, and the API
reference.

Documents that the cache lifespan is not purely a performance setting:
it also bounds how long a key the provider revoked keeps validating
tokens.

Signed-off-by: Larry Singleton <166439969+larrysingleton007@users.noreply.github.com>
Code review findings on the JWKS tunables change.

The OLM bundle CRD was not regenerated, so it lacked both new fields
while config/crd/bases and dist/install.yaml carried them. Every other
OidcAuthz field is present in all three copies, and no PR workflow runs
make bundle, so CI would not have caught it: an OLM install would have
pruned the settings silently rather than failing. Regenerated with
make bundle; operator-sdk bundle validate passes.

Assert the client repo config omits both keys. OidcClientAuthConfig
inherits the same strict validation, so mirroring the forwarding into
the client path would break every client pod, and nothing tested it.
Also restore the neighbouring blocks' length assertion so a leaked
parameter fails.

Add CRD validation tests for the Minimum=1 constraints the docs promise.

Docs: caCertConfigMap was documented as a bare string but the CRD
requires an object with a name key, so the whole snippet failed to
apply, including the lines added here. Name the required Feast version
instead of implying any newer image works.

Signed-off-by: Larry Singleton <166439969+larrysingleton007@users.noreply.github.com>
@larrysingleton007
larrysingleton007 requested a review from a team as a code owner July 31, 2026 19:45
@codecov-commenter

codecov-commenter commented Jul 31, 2026

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 46.77%. Comparing base (a1e6fc2) to head (06aa2e5).
⚠️ Report is 1 commits behind head on master.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #6690   +/-   ##
=======================================
  Coverage   46.77%   46.77%           
=======================================
  Files         414      414           
  Lines       50191    50191           
  Branches     7181     7181           
=======================================
  Hits        23475    23475           
  Misses      25077    25077           
  Partials     1639     1639           
Flag Coverage Δ
go-feature-server 30.58% <ø> (ø)
python-unit 48.10% <ø> (ø)

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4efb86c...06aa2e5. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

Expose the OIDC JWKS cache lifespan and fetch timeout through the feast-operator

2 participants