Skip to content

Plane-EE: Add aes secret key#100

Merged
mguptahub merged 2 commits intodevelopfrom
add-aes-secret-key
May 8, 2025
Merged

Plane-EE: Add aes secret key#100
mguptahub merged 2 commits intodevelopfrom
add-aes-secret-key

Conversation

@akshat5302
Copy link
Member

@akshat5302 akshat5302 commented May 8, 2025

Summary by CodeRabbit

  • New Features

    • Introduced a new environment variable for silo services to support an AES secret key, with a default value provided.
    • Added configuration options and documentation for the new AES secret key in deployment and setup guides.
    • The AES secret key is now included in the generated Kubernetes secrets for both app and silo services.
  • Chores

    • Updated the Helm chart version to 1.2.1.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented May 8, 2025

Walkthrough

This update introduces a new AES secret key configuration for the silo service in the plane-enterprise Helm chart. The change adds the key to the chart's values, documentation, configuration questions, and Kubernetes secret manifests, and increments the chart version from 1.2.0 to 1.2.1.

Changes

File(s) Change Summary
charts/plane-enterprise/Chart.yaml Incremented chart version from 1.2.0 to 1.2.1.
charts/plane-enterprise/README.md Documented new environment variable env.silo_envs.aes_secret_key with default value for silo deployment.
charts/plane-enterprise/questions.yml Added configuration question for new env.silo_envs.aes_secret_key under "Silo Setup" group.
charts/plane-enterprise/templates/config-secrets/app-env.yaml,
.../silo.yaml
Added AES_SECRET_KEY entry to Kubernetes Secret manifests, sourced from Helm values with a default fallback value.
charts/plane-enterprise/values.yaml Added aes_secret_key under env.silo_envs with a default value.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Helm Chart
    participant Kubernetes
    participant Silo Service

    User->>Helm Chart: Install/Upgrade plane-enterprise chart
    Helm Chart->>Kubernetes: Deploy secrets with AES_SECRET_KEY from values.yaml
    Kubernetes->>Silo Service: Injects AES_SECRET_KEY as environment variable
    Silo Service-->>User: Runs with configured AES secret key
Loading

Possibly related PRs

Suggested reviewers

  • mguptahub

Poem

In the warren of code, a secret appears,
AES key nestled, to silence our fears.
From values to secrets, it hops along,
Securing the silo, where secrets belong.
With a twitch of our whiskers, we cheer the new day—
Chart version hops up, and encryption’s at play!
🐇🔑✨

Tip

⚡️ Faster reviews with caching
  • CodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure Review - Disable Cache at either the organization or repository level. If you prefer to disable all data retention across your organization, simply turn off the Data Retention setting under your Organization Settings.

Enjoy the performance boost—your workflow just got faster.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (2)
charts/plane-enterprise/README.md (1)

270-270: Document Security Considerations for AES Key

Add a note that the default AES key is for demonstration only and should be overridden in production with a secure, user-supplied value. For example:

Security Note: Always provide your own AES key via --set env.silo_envs.aes_secret_key=<your-secret>; do not rely on the default.

charts/plane-enterprise/questions.yml (1)

252-255: Enhance security for AES secret key configuration

  1. Use type: password instead of string so the key is masked in UI prompts.
  2. Avoid committing a fixed default key; instead set default: "" and generate a strong random value at install time (e.g., via a Helm helper or external secrets).
  - variable: env.silo_envs.aes_secret_key
    label: "Silo AES Secret Key"
-   type: string
-   default: "dsOdt7YrvxsTIFJ37pOaEVvLxN8KGBCr"
+   type: password
+   default: ""

Let me know if you’d like assistance drafting a helpers.tpl function to generate a randAlphaNum 32 key when none is provided.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bb335b7 and 9d0cc3a.

📒 Files selected for processing (6)
  • charts/plane-enterprise/Chart.yaml (1 hunks)
  • charts/plane-enterprise/README.md (1 hunks)
  • charts/plane-enterprise/questions.yml (1 hunks)
  • charts/plane-enterprise/templates/config-secrets/app-env.yaml (1 hunks)
  • charts/plane-enterprise/templates/config-secrets/silo.yaml (1 hunks)
  • charts/plane-enterprise/values.yaml (1 hunks)
🧰 Additional context used
🪛 Gitleaks (8.21.2)
charts/plane-enterprise/values.yaml

207-207: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

🔇 Additional comments (2)
charts/plane-enterprise/Chart.yaml (1)

8-8: Semantic Version Bump Verified

The Chart version has been correctly incremented from 1.2.0 to 1.2.1 to reflect the addition of the AES secret key feature. Ensure that corresponding updates (e.g., Chart.lock, release notes) are applied in the release process.

charts/plane-enterprise/templates/config-secrets/app-env.yaml (1)

10-10: Verify the Values Path for App Secret

The AES_SECRET_KEY entry in the app secret is sourcing from .Values.env.silo_envs.aes_secret_key. Confirm whether this key should live under silo_envs or be its own top-level env.aes_secret_key. Align the chart values and documentation to reflect the correct path.

mq_prefetch_count: 1
request_interval: 400
hmac_secret_key: ''
aes_secret_key: 'dsOdt7YrvxsTIFJ37pOaEVvLxN8KGBCr'
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Remove Hardcoded Default Secret

Embedding a static AES key in values.yaml poses a security risk. It's recommended to default this value to empty (forcing users to provide their own) or to generate a random key at deployment time rather than checking in a fixed secret.

Suggest:

-    aes_secret_key: 'dsOdt7YrvxsTIFJ37pOaEVvLxN8KGBCr'
+    aes_secret_key: ''  # Required: provide a secure AES key

Or leverage Helm functions (e.g., randAlphaNum) in the templates to auto-generate one if none is supplied.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
aes_secret_key: 'dsOdt7YrvxsTIFJ37pOaEVvLxN8KGBCr'
aes_secret_key: '' # Required: provide a secure AES key
🧰 Tools
🪛 Gitleaks (8.21.2)

207-207: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

Comment on lines +18 to +19
AES_SECRET_KEY: {{ .Values.env.silo_envs.aes_secret_key | default "dsOdt7YrvxsTIFJ37pOaEVvLxN8KGBCr" | quote }}

Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Avoid Static Fallback for AES Secret

Similar to SILO_HMAC_SECRET_KEY, the AES key should not default to a hardcoded constant. Use Helm’s randAlphaNum or require the user to supply it to ensure secrecy:

-  AES_SECRET_KEY: {{ .Values.env.silo_envs.aes_secret_key | default "dsOdt7YrvxsTIFJ37pOaEVvLxN8KGBCr" | quote }}
+  AES_SECRET_KEY: {{ .Values.env.silo_envs.aes_secret_key | default (randAlphaNum 32) | quote }}

@mguptahub mguptahub merged commit 53d0b93 into develop May 8, 2025
3 checks passed
@mguptahub mguptahub deleted the add-aes-secret-key branch May 8, 2025 08:29
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.

2 participants