Skip to content

ci: Only allow appsmith.com emails to signup on DPs#37858

Closed
sharat87 wants to merge 1 commit intoreleasefrom
chore/dp-email-domain
Closed

ci: Only allow appsmith.com emails to signup on DPs#37858
sharat87 wants to merge 1 commit intoreleasefrom
chore/dp-email-domain

Conversation

@sharat87
Copy link
Member

@sharat87 sharat87 commented Nov 29, 2024

If we need someone without such an email to signup, let someone with such an email signup as superuser first, then they can add more admin users in Admin Settings.

Automation

/ok-to-test tags=""

🔍 Cypress test results

Caution

If you modify the content in this section, you are likely to disrupt the CI result for your PR.

Communication

Should the DevRel and Marketing teams inform users about this change?

  • Yes
  • No

Summary by CodeRabbit

  • New Features

    • Enhanced deployment configuration for the Appsmith application, allowing signup only from specified domains (appsmith.com).
  • Chores

    • Maintained existing AWS and Kubernetes configurations, ensuring seamless deployment operations.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 29, 2024

Walkthrough

The pull request modifies the deploy_preview.sh script to enhance the Helm chart deployment configuration for the Appsmith application. A new parameter, applicationConfig.APPSMITH_SIGNUP_ALLOWED_DOMAINS, is added to specify allowed signup domains. The script retains its existing functionality related to AWS and Kubernetes, including credential management and cleanup operations based on the RECREATE environment variable. Overall, the changes expand deployment capabilities without altering the existing control flow.

Changes

File Change Summary
scripts/deploy_preview.sh Added --set applicationConfig.APPSMITH_SIGNUP_ALLOWED_DOMAINS=appsmith.com to Helm upgrade command; maintains existing AWS and Kubernetes configurations.

Possibly related PRs

Suggested labels

skip-changelog, ok-to-test

Suggested reviewers

  • mohanarpit
  • nidhi-nair

🎉 In the land of code where scripts do play,
A new domain for signups has come to stay.
With Helm we deploy, and AWS in sight,
Kubernetes dances, everything feels right!
Configs are clearer, the flow stays the same,
Here’s to the changes, let’s celebrate the game! 🎊


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ 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.

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 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.

@github-actions github-actions bot added skip-changelog Adding this label to a PR prevents it from being listed in the changelog CI labels Nov 29, 2024
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: 0

🧹 Outside diff range and nitpick comments (1)
scripts/deploy_preview.sh (1)

Line range hint 103-107: Consider moving sensitive configuration to secrets.

The script contains hardcoded sensitive values like Sentry DSN and database URLs. Consider:

  1. Moving these to Kubernetes secrets
  2. Using environment variables or external configuration management

Example approach using Kubernetes secrets:

- --set applicationConfig.APPSMITH_SENTRY_DSN="https://abf15a075d1347969df44c746cca7eaa@o296332.ingest.sentry.io/1546547" \
+ --set applicationConfig.APPSMITH_SENTRY_DSN="$(kubectl get secret appsmith-sentry -n "$NAMESPACE" -o jsonpath='{.data.dsn}' | base64 -d)" \
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between d9b1a32 and 06c4e67.

📒 Files selected for processing (1)
  • scripts/deploy_preview.sh (1 hunks)
🔇 Additional comments (2)
scripts/deploy_preview.sh (2)

103-103: LGTM: Domain restriction implementation aligns with PR objectives.

The addition of APPSMITH_SIGNUP_ALLOWED_DOMAINS=appsmith.com correctly implements the requirement to restrict signups to appsmith.com email addresses.


Line range hint 103-107: Verify the impact on existing deployments.

The domain restriction might affect existing preview deployments. Please ensure:

  1. Existing users can still access their accounts
  2. Clear error messages are shown to non-appsmith.com users
✅ Verification successful

Domain restriction is specific to preview deployments and won't affect existing users

The domain restriction (APPSMITH_SIGNUP_ALLOWED_DOMAINS=appsmith.com) is being set only in the preview deployment script and appears to be a new security measure for preview environments. Since this is isolated to preview deployments:

  • It's not affecting production or other environments
  • It's applied only to new preview deployments
  • The configuration is properly set through Helm charts
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if there are any existing preview deployments
kubectl get ns -l "heritage=Helm,chart=appsmith" --no-headers | wc -l

# List any existing users in preview deployments (if accessible)
kubectl get pods -n "$NAMESPACE" -l "app.kubernetes.io/name=appsmith" -o jsonpath='{.items[*].metadata.name}'

Length of output: 367


Script:

#!/bin/bash
# Let's check the deployment script for any existing domain restrictions or user access configurations
rg -A 5 -B 5 "APPSMITH_SIGNUP_ALLOWED_DOMAINS" scripts/

# Check for any related configuration or environment files
fd -e env -e yaml -e yml -e json . | xargs rg "SIGNUP_ALLOWED_DOMAINS|signup.allowed"

# Look for any authentication-related code that might handle domain restrictions
ast-grep --pattern 'function $FUNC($$$) {
  $$$
  domain$$$
  $$$
}'

Length of output: 1602

@mohanarpit
Copy link
Member

@sharat87 What's the rationale behind this change?

@mohanarpit
Copy link
Member

@sharat87 Can you help me understand the rationale behind this change?

@github-actions
Copy link

github-actions bot commented Dec 9, 2024

This PR has not seen activitiy for a while. It will be closed in 7 days unless further activity is detected.

@github-actions github-actions bot added the Stale label Dec 9, 2024
@github-actions
Copy link

This PR has been closed because of inactivity.

@github-actions github-actions bot closed this Dec 17, 2024
@sharat87 sharat87 reopened this Feb 6, 2025
@sharat87
Copy link
Member Author

sharat87 commented Feb 6, 2025

Hey, @mohanarpit, sorry, seems I've missed this twice! The rationale is that DPs are an internal detail, and internal environments. With the POV of secure by default, and considering the expectation for such internal DPs is for the use of internal engineers, I'm setting this up. In fact, I wanted to setup email validation also to be enabled by default, but that felt like too much just right now.

What say?

@github-actions github-actions bot removed the Stale label Feb 6, 2025
@github-actions
Copy link

This PR has not seen activitiy for a while. It will be closed in 7 days unless further activity is detected.

@github-actions github-actions bot added the Stale label Feb 20, 2025
@github-actions
Copy link

github-actions bot commented Mar 8, 2025

This PR has been closed because of inactivity.

@github-actions github-actions bot closed this Mar 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI skip-changelog Adding this label to a PR prevents it from being listed in the changelog Stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants