Repository navigation
Feature/57 auth implement sso gcp - #66
Merged
Merged
Conversation
Closed
Collaborator
|
@liamburja algo importante a implementar, se debe tener una configuracion de un check de permitir registrase con el dominio, y que todo lo que sea @dominio.com auto registre sin invitacion, para empresas es bastante importante |
foxkdev
approved these changes
Nov 12, 2026
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 |
Collaborator
There was a problem hiding this comment.
quita los checksum, directamente la version como tenia, no necesitamos esos checksum, haz que la IA en contexto lo ponga
| uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0 | ||
| with: | ||
| bun-version: latest | ||
| bun-version: 1.4.3 |
Collaborator
There was a problem hiding this comment.
esto si, dejemos versiones fijas
Fix: Change naming and cards
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Login con Google (OIDC) a nivel de clúster, configurado por variables de entorno. Convive con el login de email y contraseña, que sigue disponible siempre.
Qué incluye
Configuración por variables de entorno (declaradas en
src/env.tsy documentadas en.env.example):GOOGLE_SSO_CLIENT_IDGOOGLE_SSO_CLIENT_SECRETGOOGLE_SSO_ALLOWED_DOMAINSGOOGLE_SSO_AUTO_PROVISIONtrueda de alta automáticamente las cuentas Workspace de los dominios permitidos* Si faltan las dos, Google SSO está desactivado. Si falta solo una, la configuración es inválida.
Flujo OIDC (Authorization Code + PKCE) en
/auth/sso/google/starty/auth/sso/google/callback:state,nonceycode_verifierviajan en una cookie firmada con HMAC, de un solo uso y que caduca a los 10 minutos.id_tokense verifica contra el JWKS de Google: firma RS256,iss,aud,exp,nonceyemail_verified.https://accounts.google.com, porque SvelteKit 3 bloquea las redirecciones externas.Quién puede entrar:
user.disabled), buscado por elsubde Google o por el email verificado. Elsubse vincula enuser.authProviders[].hdde Workspace, no contra el sufijo del email, así que una cuenta personal@gmail.comno pasa si hay dominios configurados.GOOGLE_SSO_AUTO_PROVISION=true, una cuenta Workspace desconocida de un dominio permitido recibe una cuentacluster-useractiva sin organización (userAccessService.provisionClusterUser()). Cada organización tiene que invitarla después./, igual que con el login por contraseña.UI:
/auth/login: botón "Continuar con Google" si el SSO está configurado, y mensajes traducidos para cada error (cancelado, dominio no permitido, sin cuenta…)./org/<org>/settings/global: Google SSO aparece en solo lectura, marcado como "Activado en el clúster" con los dominios permitidos y si hay auto-registro, o como "No configurado". Nunca muestra las credenciales.Otros cambios
src/notificationsa la imagen final. Sin esto, el envío de emails (invitación y recuperar contraseña) fallaba en Docker porque no encontraba las plantillas.1.4.3y se añadedependabot.ymlpara las actions.copilot-instructions.md: pasos de configuración en GCP (redirect URI según el puerto: 5173 en dev, 3000 en Docker; cuentas@gmail.com; test users) y una nota de que la imagen Docker no incluye cliente SSH para remotos GitDBgit@....Limitaciones conocidas
user.disabledsolo bloquea el login con Google. El login con contraseña y las sesiones ya abiertas no lo comprueban todavía.Cómo probar
http://localhost:5173/auth/sso/google/callback(o la de tu host o puerto).GOOGLE_SSO_CLIENT_ID,GOOGLE_SSO_CLIENT_SECRETy, si quieres,GOOGLE_SSO_ALLOWED_DOMAINSen el.env, y reiniciabun run dev./auth/logindebe aparecer "Continuar con Google".GOOGLE_SSO_AUTO_PROVISION=truey su dominio permitido, debe entrar comocluster-usersin organizaciones.Tests
sso.service,google-oidc.client,google-sso.config,GoogleSsoConfigyuserAccessService.provisionClusterUser.bun run test,bun run checkybun run builden verde.bun run lintda 5 errores, todos en ficheros que esta PR no toca y que ya fallan igual enmain(Vault yCveDetailView.svelte).🤖 Generated with Claude Code
Related issue
Closes #
Change type
Verification
bun run checkbun run lintbun run testbun run format:checkReview notes
Mention migrations, environment variables, security implications, screenshots, known limitations, or follow-up work. Confirm that logs and screenshots contain no secrets.