Skip to content

fix: env to control tenant config visibility#989

Merged
fenos merged 2 commits into
masterfrom
tenant/env-for-tenant-sensible-info
May 27, 2026
Merged

fix: env to control tenant config visibility#989
fenos merged 2 commits into
masterfrom
tenant/env-for-tenant-sensible-info

Conversation

@fenos
Copy link
Copy Markdown
Contributor

@fenos fenos commented Apr 7, 2026

What kind of change does this PR introduce?

Improvement

What is the current behavior?

  • tenant sensitive information are always returned from admin endpoints

What is the new behavior?

  • New environment variable to toggle returning tenant sensitive information

@fenos fenos requested a review from a team as a code owner April 7, 2026 08:30
Copilot AI review requested due to automatic review settings April 7, 2026 08:30
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a configuration toggle to control whether admin tenant endpoints return decrypted, sensitive tenant configuration values.

Changes:

  • Introduces ADMIN_RETURN_TENANT_SENSITIVE_DATA config flag (defaulting to enabled unless explicitly set to false).
  • Gates sensitive fields (anonKey, DB URLs, jwtSecret, jwks, serviceKey) in admin GET /tenants and GET /tenants/:tenantId responses behind the new flag.
  • Documents the new environment variable in .env.sample.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
src/http/routes/admin/tenants.ts Conditionally includes decrypted tenant secrets in admin GET responses based on config flag.
src/config.ts Adds adminReturnTenantSensitiveData to runtime config, sourced from env.
.env.sample Documents ADMIN_RETURN_TENANT_SENSITIVE_DATA and its effect on tenant admin endpoints.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/http/routes/admin/tenants.ts
Comment thread .env.sample
@coveralls
Copy link
Copy Markdown

coveralls commented Apr 7, 2026

Coverage Report for CI Build 26504259252

Coverage remained the same at 75.15%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: 1 of 1 lines across 1 file are fully covered (100%).
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 10644
Covered Lines: 8433
Line Coverage: 79.23%
Relevant Branches: 6229
Covered Branches: 4247
Branch Coverage: 68.18%
Branches in Coverage %: Yes
Coverage Strength: 363.29 hits per line

💛 - Coveralls

@fenos fenos force-pushed the tenant/env-for-tenant-sensible-info branch from 6fadb26 to c6ed793 Compare April 7, 2026 11:58
@ferhatelmas ferhatelmas requested a review from Copilot April 7, 2026 17:43
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/config.ts
Comment thread .env.sample
@fenos fenos force-pushed the tenant/env-for-tenant-sensible-info branch from 8e9c715 to a90822f Compare May 27, 2026 07:42
@fenos fenos force-pushed the tenant/env-for-tenant-sensible-info branch from a90822f to e7c2e09 Compare May 27, 2026 09:56
@fenos fenos merged commit 4778d47 into master May 27, 2026
20 of 21 checks passed
@fenos fenos deleted the tenant/env-for-tenant-sensible-info branch May 27, 2026 10:06
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.

4 participants