Skip to content

move to production#3583

Merged
Baalmart merged 46 commits into
masterfrom
staging
Jun 7, 2026
Merged

move to production#3583
Baalmart merged 46 commits into
masterfrom
staging

Conversation

@Baalmart

@Baalmart Baalmart commented Jun 6, 2026

Copy link
Copy Markdown
Collaborator

Codebmk and others added 27 commits June 3, 2026 17:53
Change isHCaptchaEnabled to allow hCaptcha on production as well as staging, but only if a hCaptcha site key is configured. The function now checks getEnvironment() (lowercased) and requires getHCaptchaSiteKey() to be truthy; the comment was updated to match the new behavior.
Replace the single-provider Google auth component with a new SocialAuthSection that supports Google, GitHub, LinkedIn and X. Extend oauth-session with supported provider types, helpers to resolve redirect URLs, and localStorage helpers to track the last-used provider. Update the login page to use the new social component, display an error banner for oauth failures, and clean the URL after showing the error. Add a redirect from /user/login to /login in next.config and update NEXT_PUBLIC_API_URL in the example env to the vertex staging API. Remove the old google-auth-section component.
Use user's last active module for social auth redirect (falls back to /admin/networks for admin or /home) and import getLastActiveModule in SocialAuthSection. Change middleware authorized callback to always return true. Update API proxy destination from staging-analytics.airqo.net to staging-vertex.airqo.net in both next.config files and add a redirect from /user/home to /home in next.config.mjs.
Extend isHCaptchaEnabled to also return true in development when an hCaptcha site key is present. Previously hCaptcha was only enabled for staging and production, which prevented local/dev testing; this change allows developers to test hCaptcha locally if the site key is configured.
Include PERMISSIONS.NETWORK.VIEW in the role's permission array in src/vertex/core/permissions/constants.ts so the system-wide role (canOverrideOrganization: false) is granted network view access.
Introduce a containerized local environment for the internal "The Mariana" documentation using BookStack. Adds docker-compose.yml (BookStack + MariaDB), .env.example with recommended defaults (APP_URL, DB creds, APP_PUBLIC=false), .gitignore to protect .env and persisted data (config/, db_data/), and a README with setup, access, security guidance, IA conventions, and persistence notes. Intended for local development on port 6875; remember to copy .env.example -> .env and update default credentials and secrets before use.
Introduce a new Helm chart for AirQo internal docs (The Mariana). Adds Chart.yaml, template helpers, deployments for app (BookStack) and DB (MariaDB), services, and PVCs. Includes environment-specific values files for production and staging with image defaults (linuxserver/bookstack, linuxserver/mariadb), resource and autoscaling settings, nodeSelector/affinity, unique NodePorts, configmap references, DB env vars, and 5Gi persistent storage for both app and DB.
Rebrand internal docs from "The Mariana" to "Mariana Deep" across .env.example, README, docker-compose.yml, and Chart.yaml. Standardize MariaDB usage by switching to the official mariadb:10.6 image, changing the DB data mount to /var/lib/mysql, switching to a named Docker volume (bookstack_db_data) and adding the volume block in docker-compose. Mirror the image/tag change in Helm values and adjust the k8s deployment volume mount. Also add db_data_v2/ to .gitignore.
Delete k8s/values-stage.yaml and update src/internal-docs/README.md to remove staging references and the staging Helm command. The README now states Helm charts deploy to the production cluster and retains the production deploy command (-f k8s/values-prod.yaml -n production). This cleans up stale staging configuration and documentation.
Introduce a Kubernetes Secret for sensitive BookStack environment variables and stop storing secrets in the ConfigMap. Added templates/secret.yaml and removed APP_KEY, DB_PASS, MYSQL_PASSWORD and MYSQL_ROOT_PASSWORD from the ConfigMap; deployments for app and db now load secrets via secretRef. Update MariaDB readiness/liveness checks to use 127.0.0.1 and authenticate with MYSQL_ROOT_PASSWORD. Bumped Helm Chart appVersion and updated docs/.env example to use the newer `docker compose up -d` command. This improves security by requiring secret injection via CI/CD or cluster secrets.
Feat: Initial Setup & Kubernetes Infrastructure for Mariana Deep (Internal Docs)
@gitguardian

gitguardian Bot commented Jun 6, 2026

Copy link
Copy Markdown

⚠️ GitGuardian has uncovered 1 secret following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secret in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
33762647 Triggered Laravel APP_KEY 0fe4bcd src/internal-docs/.env.example View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secret safely. Learn here the best practices.
  3. Revoke and rotate this secret.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@coderabbitai

coderabbitai Bot commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 29765c7d-0b12-40cc-a491-610c96eb418d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch staging

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

Comment @coderabbitai help to get the list of available commands and usage tips.

@Codebmk
Codebmk requested a review from Psalmz777 June 6, 2026 09:25
Codebmk and others added 19 commits June 7, 2026 08:27
Capture the initial OAuth hash and prevent UI unblocking during client-side token handoff: use a ref (isHandlingOAuthRef) to record if the URL initially contains a token, add a shouldUnblock flag so setIsBootstrapping(false) is skipped when the browser is redirected, and only clear the ref when safe. Also add waitForSession to the effect deps and use the ref for the initial loading guard. In middleware, relax server-side authorization for OAuth callback requests (allow when search param 'success' is present) so the client can process the token hash while still enforcing protection client-side if the token is invalid.
Refine TokenHandoffHandler to avoid unnecessary full-page reloads when the client is already on the redirect destination. The handler now compares the current pathname to the redirect target and uses client-side router.replace for same-path redirects (allowing the UI to unblock), while preserving window.location.replace for cross-page redirects and keeping the UI blocked to prevent flashing. Also update changelog to mention the optimized redirect logic.
Fetch and sync organization onboarding checklist state from the server and persist updates.

- Add API helpers: updateGroupOnboardingApi and getGroupDetailsApi to organizations API.
- Update types: add onboarding_checklist to Group and User types.
- Extend userSlice with updateActiveGroupOnboarding to update active group and userGroups state.
- Revamp WelcomePage: fetch up-to-date group details, separate local (personal) and org checklist state, compute visuallyCompletedSteps, and handle marking/dismissing steps via API calls. Updates also update query cache and dispatch redux updates. Auto-complete logic for steps now accounts for org vs personal scope.
- Misc: import/use useAppDispatch and react-query useQuery for group details.

This enables backend-driven onboarding checklist for org workspaces while preserving local storage behavior for personal scope.
Replace createSecureApiClient with secureApiProxy in groupsApi and export a groupsApi object for callers. In the Welcome page, switch to importing groupsApi and destructure updateGroupOnboardingApi/getGroupDetailsApi. Add permission, device and cohort hooks to auto-detect existing devices/cohorts and surface those steps as completed (visually and persisted for personal scopes). Change auto-step syncing to sequential calls with error handling, unify how updated onboarding_checklist is read from API responses, and update the react-query cache accordingly. Remove duplicated logic, update effect dependencies, and add a delayed dismiss of the checklist after workspace setup completes.
Introduce useGroupDetails and useUpdateGroupOnboarding hooks (useQuery/useMutation wrappers) in useGroups.ts and refactor the authenticated Home/Welcome page to use them. Replace direct groupsApi calls and a raw useQuery with the new hooks, import Group type, wire mutateAsync for onboarding updates, tighten setQueryData typing, and add the mutation to the effect deps. This centralizes group-related react-query logic and removes unused imports.
…ial-auth

feat: Multi-provider social auth, proxy updates, and RBAC fixes (vertex app)
@Baalmart
Baalmart merged commit a3a8f47 into master Jun 7, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants