This repository has been archived by the owner on Feb 15, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into 706-lint-uds-helm-docker-zarf-lints
- Loading branch information
Showing
29 changed files
with
365 additions
and
134 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
variables: | ||
core-slim-dev: | ||
INSECURE_ADMIN_PASSWORD_GENERATION: "true" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
KEYCLOAK_ADMIN_PASSWORD=$(uds zarf tools kubectl get secret -n keycloak keycloak-admin-password -o jsonpath={.data.password} | base64 -d) | ||
echo "::add-mask::$KEYCLOAK_ADMIN_PASSWORD" | ||
|
||
KEYCLOAK_ADMIN_TOKEN=$(curl --location "https://keycloak.admin.uds.dev/realms/master/protocol/openid-connect/token" \ | ||
--http1.1 \ | ||
--header "Content-Type: application/x-www-form-urlencoded" \ | ||
--data-urlencode "username=admin" \ | ||
--data-urlencode "password=${KEYCLOAK_ADMIN_PASSWORD}" \ | ||
--data-urlencode "client_id=admin-cli" \ | ||
--data-urlencode "grant_type=password" | uds zarf tools yq .access_token) | ||
echo "::add-mask::$KEYCLOAK_ADMIN_TOKEN" | ||
|
||
|
||
curl --location "https://keycloak.admin.uds.dev/admin/realms/uds/users" \ | ||
--http1.1 \ | ||
--header "Content-Type: application/json" \ | ||
--header "Authorization: Bearer ${KEYCLOAK_ADMIN_TOKEN}" \ | ||
--data "{ | ||
\"username\": \"doug\", | ||
\"firstName\": \"Doug\", | ||
\"lastName\": \"Unicorn\", | ||
\"email\": \"doug@uds.dev\", | ||
\"attributes\": { | ||
\"mattermostid\": \"1\" | ||
}, | ||
\"emailVerified\": true, | ||
\"enabled\": true, | ||
\"requiredActions\": [], | ||
\"credentials\": [ | ||
{ | ||
\"type\": \"password\", | ||
\"value\": \"${FAKE_E2E_USER_PASSWORD}\", | ||
\"temporary\": false | ||
} | ||
] | ||
}" | ||
|
||
CONDITIONAL_OTP_ID=$(curl --location "https://keycloak.admin.uds.dev/admin/realms/uds/authentication/flows/Authentication/executions" \ | ||
--http1.1 \ | ||
--header "Authorization: Bearer ${KEYCLOAK_ADMIN_TOKEN}" | uds zarf tools yq '.[] | select(.displayName == "Conditional OTP") | .id') | ||
|
||
curl --location --request PUT "https://keycloak.admin.uds.dev/admin/realms/uds/authentication/flows/Authentication/executions" \ | ||
--http1.1 \ | ||
--header "Content-Type: application/json" \ | ||
--header "Authorization: Bearer ${KEYCLOAK_ADMIN_TOKEN}" \ | ||
--data "{ | ||
\"id\": \"${CONDITIONAL_OTP_ID}\", | ||
\"requirement\": \"DISABLED\" | ||
}" | ||
|
||
USER=$(curl --location "https://keycloak.admin.uds.dev/admin/realms/uds/users?user=doug" \ | ||
--http1.1 \ | ||
--header "Content-Type: application/json" \ | ||
--header "Authorization: Bearer ${KEYCLOAK_ADMIN_TOKEN}" \ | ||
) | ||
|
||
echo "User: $USER" |
This file contains 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
This file contains 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
File renamed without changes
This file contains 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
This file contains 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
18 changes: 18 additions & 0 deletions
18
packages/supabase/chart/templates/supabase-realtime-secret.yaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{{- $dbEncKey := randAlphaNum 16 }} # This needs to be exactly 16 characters | ||
{{- $existingSecret := (lookup "v1" "Secret" .Release.Namespace "supabase-realtime-extra") }} | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: supabase-realtime-extra | ||
namespace: {{ .Release.Namespace }} | ||
{{- if $existingSecret }} | ||
annotations: | ||
"helm.sh/resource-policy": keep | ||
{{- end }} | ||
type: Opaque | ||
data: | ||
{{- if $existingSecret }} | ||
dbEncKey: {{ $existingSecret.data.dbEncKey }} | ||
{{- else }} | ||
dbEncKey: {{ $dbEncKey | b64enc | quote }} | ||
{{- end }} |
This file contains 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
22 changes: 22 additions & 0 deletions
22
packages/supabase/migrations/20240808093300_v0.10.0_realtime_tenant.sql
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
-- Disable the foreign key constraint | ||
ALTER TABLE _realtime.extensions | ||
DROP CONSTRAINT extensions_tenant_external_id_fkey; | ||
|
||
-- Update the external_id and name for the realtime tenant | ||
UPDATE _realtime.tenants | ||
SET external_id = 'supabase-realtime', | ||
name = 'supabase-realtime' | ||
WHERE external_id = 'realtime-dev' | ||
AND name = 'realtime-dev'; | ||
|
||
-- Update the tenant_external_id for the realtime extension | ||
UPDATE _realtime.extensions | ||
SET tenant_external_id = 'supabase-realtime' | ||
WHERE tenant_external_id = 'realtime-dev'; | ||
|
||
-- Re-enable the foreign key constraint | ||
ALTER TABLE _realtime.extensions | ||
ADD CONSTRAINT extensions_tenant_external_id_fkey | ||
FOREIGN KEY (tenant_external_id) | ||
REFERENCES _realtime.tenants(external_id) | ||
ON DELETE CASCADE; |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,4 +20,5 @@ zarf-sbom/ | |
|
||
|
||
playwright/.auth | ||
test-results/ | ||
test-results/ | ||
e2e-report/ |
Oops, something went wrong.