Skip to content

Commit

Permalink
chore: update alpine (#3449)
Browse files Browse the repository at this point in the history
  • Loading branch information
aeneasr committed Feb 28, 2023
1 parent c3af131 commit 9a5afd2
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .docker/Dockerfile-alpine
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.16
FROM alpine:3.17.2

RUN addgroup -S ory; \
adduser -S ory -G ory -D -H -s /bin/nologin
Expand Down
2 changes: 1 addition & 1 deletion .docker/Dockerfile-build
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.19-alpine3.16 AS builder
FROM golang:1.19-alpine3.17 AS builder

RUN apk -U --no-cache --upgrade --latest add build-base git gcc bash

Expand Down
2 changes: 1 addition & 1 deletion .docker/Dockerfile-hsm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.19-alpine3.16 AS builder
FROM golang:1.19-alpine3.17 AS builder

RUN apk -U --no-cache --upgrade --latest add build-base git gcc bash

Expand Down
2 changes: 1 addition & 1 deletion .docker/Dockerfile-scratch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.16
FROM alpine:3.17.2

RUN apk --no-cache --upgrade --latest add ca-certificates

Expand Down
2 changes: 1 addition & 1 deletion .docker/Dockerfile-sqlite
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.16
FROM alpine:3.17.2

# Because this image is built for SQLite, we create /home/ory and /home/ory/sqlite which is owned by the ory user
# and declare /home/ory/sqlite a volume.
Expand Down
2 changes: 1 addition & 1 deletion oauth2/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ func (h *Handler) SetRoutes(admin *httprouterx.RouterAdmin, public *httprouterx.
// 302: emptyResponse
func (h *Handler) performOidcFrontOrBackChannelLogout(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
ctx := r.Context()
handled, err := h.r.ConsentStrategy().HandleOpenIDConnectLogout(ctx, w, r)

handled, err := h.r.ConsentStrategy().HandleOpenIDConnectLogout(ctx, w, r)
if errors.Is(err, consent.ErrAbortOAuth2Request) {
return
} else if err != nil {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,56 @@
-- Migration generated by the command below; DO NOT EDIT.
-- hydra:generate hydra migrate gen


ALTER TABLE ONLY hydra_oauth2_flow ADD CONSTRAINT hydra_oauth2_flow_client_id_fk FOREIGN KEY (client_id) REFERENCES hydra_client(id) ON DELETE CASCADE;
ALTER TABLE ONLY hydra_oauth2_flow ADD CONSTRAINT hydra_oauth2_flow_login_session_id_fk FOREIGN KEY (login_session_id) REFERENCES hydra_oauth2_authentication_session(id) ON DELETE CASCADE;
update ory_keto.keto_relation_tuples set crdb_region = 'gcp-europe-west3' where crdb_region != 'gcp-europe-west3';
update ory_keto.keto_uuid_mappings set crdb_region = 'gcp-europe-west3' where crdb_region != 'gcp-europe-west3';
update ory_backoffice.active_projects set crdb_region = 'gcp-europe-west3' where crdb_region != 'gcp-europe-west3';

ALTER TABLE ONLY hydra_oauth2_access DROP CONSTRAINT hydra_oauth2_access_challenge_id_fk;
ALTER TABLE ONLY hydra_oauth2_access ADD CONSTRAINT hydra_oauth2_access_challenge_id_fk FOREIGN KEY (challenge_id) REFERENCES hydra_oauth2_flow(consent_challenge_id) ON DELETE CASCADE;

ALTER TABLE ONLY hydra_oauth2_code DROP CONSTRAINT hydra_oauth2_code_challenge_id_fk;
ALTER TABLE ONLY hydra_oauth2_code ADD CONSTRAINT hydra_oauth2_code_challenge_id_fk FOREIGN KEY (challenge_id) REFERENCES hydra_oauth2_flow(consent_challenge_id) ON DELETE CASCADE;
SELECT count(id), crdb_region from ory_backoffice.active_projects group by crdb_region;

ALTER TABLE ONLY hydra_oauth2_oidc DROP CONSTRAINT hydra_oauth2_oidc_challenge_id_fk;
ALTER TABLE ONLY hydra_oauth2_oidc ADD CONSTRAINT hydra_oauth2_oidc_challenge_id_fk FOREIGN KEY (challenge_id) REFERENCES hydra_oauth2_flow(consent_challenge_id) ON DELETE CASCADE;

ALTER TABLE ONLY hydra_oauth2_pkce DROP CONSTRAINT hydra_oauth2_pkce_challenge_id_fk;
ALTER TABLE ONLY hydra_oauth2_pkce ADD CONSTRAINT hydra_oauth2_pkce_challenge_id_fk FOREIGN KEY (challenge_id) REFERENCES hydra_oauth2_flow(consent_challenge_id) ON DELETE CASCADE;

ALTER TABLE ONLY hydra_oauth2_refresh DROP CONSTRAINT hydra_oauth2_refresh_challenge_id_fk;
ALTER TABLE ONLY hydra_oauth2_refresh ADD CONSTRAINT hydra_oauth2_refresh_challenge_id_fk FOREIGN KEY (challenge_id) REFERENCES hydra_oauth2_flow(consent_challenge_id) ON DELETE CASCADE;
SELECT id FROM ory_keto.keto_uuid_mappings WHERE string_representation='2339d03a-41d5-4c76-9dc2-dc69a5c56f2c'; -- object
SELECT id FROM ory_keto.keto_uuid_mappings WHERE string_representation='a9f362fa-72dc-4067-8c49-46e0f533fb42'; -- subject


SELECT keto_relation_tuples.commit_time, keto_relation_tuples.namespace, keto_relation_tuples.nid, keto_relation_tuples.object, keto_relation_tuples.relation, keto_relation_tuples.shard_id, keto_relation_tuples.subject_id, keto_relation_tuples.subject_set_namespace, keto_relation_tuples.subject_set_object, keto_relation_tuples.subject_set_relation FROM ory_keto.keto_relation_tuples AS keto_relation_tuples WHERE nid = '26f8b768-4797-4cc4-987f-b2aad16ca9f4' AND shard_id > '00000000-0000-0000-0000-000000000000' AND namespace = 'projects' AND object = '05455bbf-9413-5b37-b5fb-04cb4a259dc4' AND relation = 'owner' AND subject_id = '7479d00e-79b3-52b4-b335-538d4876dc57' AND subject_set_namespace IS NULL AND subject_set_object IS NULL AND subject_set_relation IS NULL ORDER BY shard_id, nid LIMIT 2;

SELECT keto_relation_tuples.commit_time, keto_relation_tuples.namespace, keto_relation_tuples.nid, keto_relation_tuples.object, keto_relation_tuples.relation, keto_relation_tuples.shard_id, keto_relation_tuples.subject_id, keto_relation_tuples.subject_set_namespace, keto_relation_tuples.subject_set_object, keto_relation_tuples.subject_set_relation FROM ory_keto_single_region.keto_relation_tuples AS keto_relation_tuples WHERE nid = '26f8b768-4797-4cc4-987f-b2aad16ca9f4' AND shard_id > '00000000-0000-0000-0000-000000000000' AND namespace = 'projects' AND object = '05455bbf-9413-5b37-b5fb-04cb4a259dc4' AND relation = 'owner' AND subject_id = '7479d00e-79b3-52b4-b335-538d4876dc57' AND subject_set_namespace IS NULL AND subject_set_object IS NULL AND subject_set_relation IS NULL ORDER BY shard_id, nid LIMIT 2;



ALTER DATABASE movr SET SECONDARY REGION



SELECT * FROM ory_backoffice.active_projects WHERE identity_id=gen_random_uuid();
SELECT * FROM ory_backoffice.active_projects WHERE identity_id=gen_random_uuid();
SELECT * FROM ory_backoffice.active_projects WHERE identity_id=gen_random_uuid();
SELECT * FROM ory_backoffice.active_projects WHERE identity_id='353749b2-98b8-4f23-8c97-b457c6d4fca9';
SELECT * FROM ory_backoffice.active_projects WHERE identity_id=gen_random_uuid();
SELECT * FROM ory_backoffice.active_projects WHERE identity_id=gen_random_uuid();
SELECT * FROM ory_backoffice.active_projects WHERE identity_id=gen_random_uuid();
SELECT * FROM ory_backoffice.active_projects WHERE identity_id='a9f362fa-72dc-4067-8c49-46e0f533fb42';
SELECT * FROM ory_backoffice.active_projects WHERE identity_id=gen_random_uuid();
SELECT * FROM ory_backoffice.active_projects WHERE identity_id=gen_random_uuid();
SELECT * FROM ory_backoffice.active_projects WHERE identity_id=gen_random_uuid();
SELECT * FROM ory_backoffice.active_projects WHERE identity_id='00075931-1514-45f6-bd14-7916a8e307a0';
SELECT * FROM ory_backoffice.active_projects WHERE identity_id=gen_random_uuid();
SELECT * FROM ory_backoffice.active_projects WHERE identity_id='000a7d06-d365-4dae-b74c-f3560859b4ce' LIMIT 10;
SELECT * FROM ory_backoffice.active_projects WHERE identity_id='000c018d-8c35-409b-8336-7b3b5796b5bf';
SELECT * FROM ory_backoffice.active_projects WHERE identity_id='0010c7c8-ee21-483f-818f-aed69614d3d2';
SELECT * FROM ory_backoffice.active_projects WHERE identity_id='001334af-662c-4e30-8af1-3ec430daed01';
SELECT * FROM ory_backoffice.active_projects WHERE identity_id=gen_random_uuid();
SELECT * FROM ory_backoffice.active_projects WHERE identity_id='0016d4dc-55a3-43b1-9d9a-767e15afce07';
SELECT * FROM ory_backoffice.active_projects WHERE identity_id='001b924f-986a-4766-b200-ac03079c58cd';
SELECT * FROM ory_backoffice.active_projects WHERE identity_id='001cfa5d-33ee-46d7-8eaf-9b9cf17e3ac9';
SELECT * FROM ory_backoffice.active_projects WHERE identity_id=gen_random_uuid();
SELECT * FROM ory_backoffice.active_projects WHERE identity_id='001fb4d2-2490-43a7-a58d-c4eb596ae7b7';
SELECT * FROM ory_backoffice.active_projects WHERE identity_id='0020af0b-53f4-4a42-8a50-5629097ee83b';
SELECT * FROM ory_backoffice.active_projects WHERE identity_id=gen_random_uuid();
SELECT * FROM ory_backoffice.active_projects WHERE identity_id='0022529c-3a2f-444f-a4af-4c6f7416556f';
SELECT * FROM ory_backoffice.active_projects WHERE identity_id='00251d75-14b2-4ef5-8d1a-b385c663c406';
SELECT * FROM ory_backoffice.active_projects WHERE identity_id='002cc8b6-a7c8-4a36-b372-daba738cf5da';
SELECT * FROM ory_backoffice.active_projects WHERE identity_id='002e5796-f4eb-4a94-94c0-69d7e05931e1';
SELECT * FROM ory_backoffice.active_projects WHERE identity_id=gen_random_uuid();
SELECT * FROM ory_backoffice.active_projects WHERE identity_id='002fe011-de63-4973-a434-1c751be44dd4';

0 comments on commit 9a5afd2

Please sign in to comment.