From 2f6d235ae5c3799ae3675566132b9a0eae0786a6 Mon Sep 17 00:00:00 2001 From: Nimish Date: Mon, 28 Oct 2024 21:09:29 +0530 Subject: [PATCH 1/6] fix: token header construction --- src/utils/network.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/network.py b/src/utils/network.py index d5c828d..7114155 100644 --- a/src/utils/network.py +++ b/src/utils/network.py @@ -72,7 +72,7 @@ def construct_http_headers(token_type: str, app_token: str) -> Dict[str, str]: Dict[str, str]: The common headers including User-Agent. """ return { - "Authorization": f"Bearer {token_type.capitalize()} {app_token}", + "Authorization": f"Bearer {token_type} {app_token}", "User-Agent": get_user_agent() } From a2780d77997e38a12da3338c84f166992cfae5d0 Mon Sep 17 00:00:00 2001 From: Nimish Date: Mon, 28 Oct 2024 21:09:47 +0530 Subject: [PATCH 2/6] feat: added support for service account --- src/utils/phase_io.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/utils/phase_io.py b/src/utils/phase_io.py index cb84bc6..c083681 100644 --- a/src/utils/phase_io.py +++ b/src/utils/phase_io.py @@ -63,11 +63,16 @@ def __init__(self, init=True, pss=None, host=None): token_type = "service token" if "pss_service" in app_secret else "user token" raise ValueError(f"Invalid Phase {token_type}") - # Storing the token type as a string for easier access - self._token_type = "service" if self.is_service_token else "user" - + # Store token segments pss_segments = app_secret.split(':') self._app_secret = AppSecret(*pss_segments) + + # If type service_token && version == 2; set token header as ServiceAccount + if self.is_service_token and self._app_secret.pes_version == "v2": + self._token_type = "ServiceAccount" + # Else decide between User token or legacy service token header + else: + self._token_type = "Service" if self.is_service_token else "User" def _find_matching_environment_key(self, user_data, env_id): From 0629f9cafc5962d05c2f0b0c1fbcca3f9ea956b0 Mon Sep 17 00:00:00 2001 From: Nimish Date: Mon, 28 Oct 2024 21:10:05 +0530 Subject: [PATCH 3/6] chore: bump version --- src/utils/const.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/const.py b/src/utils/const.py index e2ec292..28fd3f0 100644 --- a/src/utils/const.py +++ b/src/utils/const.py @@ -1,6 +1,6 @@ import os import re -__version__ = "1.2.2" +__version__ = "1.2.3" __ph_version__ = "v1" description = "Securely manage application secrets and environment variables with Phase." From e9bd4305fa8c4a5671c79d5994a47b64f1e4b3ed Mon Sep 17 00:00:00 2001 From: Nimish Date: Tue, 29 Oct 2024 13:19:31 +0530 Subject: [PATCH 4/6] chore: bump chart app version --- phase-kubernetes-operator/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phase-kubernetes-operator/Chart.yaml b/phase-kubernetes-operator/Chart.yaml index fd83432..fb45bcd 100644 --- a/phase-kubernetes-operator/Chart.yaml +++ b/phase-kubernetes-operator/Chart.yaml @@ -8,7 +8,7 @@ type: application version: 1.2.3 # Version of the application (operator) that is being deployed -appVersion: "1.2.2" +appVersion: "1.2.3" # Keywords, maintainers, and source URLs can also be added here keywords: From 40ddfa43bd28730bb1c361883e134df6bab39a67 Mon Sep 17 00:00:00 2001 From: Nimish Date: Tue, 29 Oct 2024 13:20:27 +0530 Subject: [PATCH 5/6] feat: updated helm repo --- helm-repo/index.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/helm-repo/index.yaml b/helm-repo/index.yaml index 5c149af..9b098d7 100644 --- a/helm-repo/index.yaml +++ b/helm-repo/index.yaml @@ -2,7 +2,7 @@ apiVersion: v1 entries: phase: - apiVersion: v2 - created: "2024-10-27T13:18:22.353245013+05:30" + created: "2024-10-29T13:20:00.665108467+05:30" description: A Helm chart for deploying the Phase Secrets Manager digest: 2bcc5bd5f1da6139c2c07abb001eb3ec8f60d0ea0e8dc5f754c4cc8ca7bfe9b3 home: https://github.com/phasehq/kubernetes-secrets-operator @@ -22,10 +22,10 @@ entries: version: 0.1.1 phase-kubernetes-operator: - apiVersion: v2 - appVersion: 1.2.2 - created: "2024-10-27T13:18:22.353595366+05:30" + appVersion: 1.2.3 + created: "2024-10-29T13:20:00.66538365+05:30" description: A Helm chart for deploying the Phase Kubernetes Operator - digest: 4e9e99e4e9d2e865dba4c5036994ddee600c4bce00d8082a5e8f511235531514 + digest: 93e571ad092af42648a8731de51d6b1a371f5b738a5b6c5a327ca38fa90d45e4 home: https://github.com/phasehq/kubernetes-secrets-operator icon: https://phase.dev/apple-touch-icon.png keywords: @@ -41,6 +41,6 @@ entries: - https://github.com/phasehq/kubernetes-secrets-operator type: application urls: - - phase-kubernetes-operator-1.2.2.tgz - version: 1.2.2 -generated: "2024-10-27T13:18:22.352479025+05:30" + - phase-kubernetes-operator-1.2.3.tgz + version: 1.2.3 +generated: "2024-10-29T13:20:00.664090903+05:30" From cdb7b7832a31267081fc2209fa482aa65d4d5b87 Mon Sep 17 00:00:00 2001 From: Nimish Date: Tue, 29 Oct 2024 13:20:47 +0530 Subject: [PATCH 6/6] feat: added operator version 1.2.3 --- helm-repo/phase-kubernetes-operator-1.2.2.tgz | Bin 3082 -> 0 bytes helm-repo/phase-kubernetes-operator-1.2.3.tgz | Bin 0 -> 3083 bytes 2 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 helm-repo/phase-kubernetes-operator-1.2.2.tgz create mode 100644 helm-repo/phase-kubernetes-operator-1.2.3.tgz diff --git a/helm-repo/phase-kubernetes-operator-1.2.2.tgz b/helm-repo/phase-kubernetes-operator-1.2.2.tgz deleted file mode 100644 index 8ab2e9bea6ed984ad4386aef9833bfcc62243cdb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3082 zcmV+l4E6ILiwG0|00000|0w_~VMtOiV@ORlOnEsqVl!4SWK%V1T2nbTPgYhoO;>Dc zVQyr3R8em|NM&qo0PH(!ZyUF=`MiMt!$4_q?=8Brq6i9V zcUEG}B^i<{N5}DhKOnhJJyt8*NzXYjKg6r$%y4GNd2%CXL}PfJO;B+(s6!!95hK+8 z$&4t|UyzhNd*B!h27}Sdm+tRiFj)ROI2sP04PTCqhDV2^qrt(m!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=x`9+ zq{Taya?R8dJ6GjL9wLWC^KPslpHn5cO(@IT=G8Mm zq-;P^?q#?KhfwsT#?X^W#93sS>9vY-PRwk(I2HLyr6;R*rm;x@o`hjgL14ZM>I zz;{k_np*(ZIGpVNHZE+9)FXOA2n)k5nQ;t%Yg} z$<5$UVz|$36yZ7%D)r?KF$ChwWtEgqQMH*C1@rks&EGcCT>uLnv?5xZ&o6hB%Bk~4K@~rqY06(OL#UibBz-+*@9r& zgNq*o`Z(ahz`f-z?}xt;h6vbF@1a)VP;t!eXUusq$8KZa#jVBOq?q+ z%nUKvs?*%q7IWZ@#+aDcINq@{*5=P!eRw3e4;>vUhLaL@wLKMON+CBDv-V}tviz5< z92n8Y1pp_~6>X~^Qq-DETL2UiEqF_1;r4g)ym?5?u_{T|Oy!i=0+yyewJ*wwOm+~d#liYfY!&5Z^s+^C%4wRVV_0#<#qg%GLoPj4Bu$B-5zyFroP?q(?~OdQ z@>~Bx1^=a;ReYgM9S#oKRZs$MEOpn1hYd=|qrvOFQHjy&aXVzbwiO;;kdMRu~^;b^Cux~6A7{4#>gx%Y}`y&5o YJdLOEGS3;+QC|BmJB697a20DR^NYXATM diff --git a/helm-repo/phase-kubernetes-operator-1.2.3.tgz b/helm-repo/phase-kubernetes-operator-1.2.3.tgz new file mode 100644 index 0000000000000000000000000000000000000000..b450d74dc29915b0440726e7d326dbcdda56ee9a GIT binary patch literal 3083 zcmV+m4D|CKiwG0|00000|0w_~VMtOiV@ORlOnEsqVl!4SWK%V1T2nbTPgYhoO;>Dc zVQyr3R8em|NM&qo0PH(!ZyUF=`MiMt!$4_q?=8BrB*$_g-~!im(k5t{7`B^>q6i9V zcUEG}B^i<{M-Bd@e>%_ci}E0 z(}t)ggL|*FD%`)xAdUjA#z;LmJe*N8&!+uIq=)YO%|9I0PN2p}p{Y({ zKqI?$f$T8)F)j{?lng^7vS=P!n7-t*;2M`VLdAL#gy2Af5Gvw92qoDN@|A*=P;Ln2 zs2m!mgt7@xo{0Y|R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