Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
6cf938d
Change URL update to entire URL
abuabraham-ttd Feb 11, 2025
c4d7703
[CI Pipeline] Released Snapshot version: 5.47.21-alpha-190-SNAPSHOT
Feb 11, 2025
27bab30
[CI Pipeline] Released Snapshot version: 5.47.22-alpha-191-SNAPSHOT
Feb 12, 2025
74a7246
Add a print
abuabraham-ttd Feb 12, 2025
e3b1a79
[CI Pipeline] Released Snapshot version: 5.47.23-alpha-192-SNAPSHOT
Feb 12, 2025
34d78f7
Merge remote-tracking branch 'origin' into abu-UID2-4880-fix-e2e
abuabraham-ttd Feb 12, 2025
5cdaf2a
Fix sed
abuabraham-ttd Feb 12, 2025
bfb84e4
[CI Pipeline] Released Snapshot version: 5.47.24-alpha-201-SNAPSHOT
Feb 12, 2025
5c5d232
Update pom.xml
abuabraham-ttd Feb 14, 2025
3aea827
[CI Pipeline] Released Snapshot version: 5.47.25-alpha-202-SNAPSHOT
Feb 14, 2025
95f07a0
[CI Pipeline] Released Snapshot version: 5.47.26-alpha-150-SNAPSHOT
Feb 14, 2025
a5a4f3e
[CI Pipeline] Released Snapshot version: 5.47.27-alpha-190-SNAPSHOT
Feb 15, 2025
074bd91
Update gcp.py
abuabraham-ttd Feb 15, 2025
cb69438
[CI Pipeline] Released Snapshot version: 5.47.28-alpha-191-SNAPSHOT
Feb 15, 2025
e1d54e7
Merge branch 'main' into abu-UID2-4880-fix-e2e
cYKatherine Feb 17, 2025
2b37d12
Use custom branch
cYKatherine Feb 18, 2025
d2cc748
[CI Pipeline] Released Snapshot version: 5.47.29-alpha-198-SNAPSHOT
Feb 18, 2025
170e077
[CI Pipeline] Released Snapshot version: 5.47.30-alpha-208-SNAPSHOT
Feb 18, 2025
a1dc6a3
Fix bug
abuabraham-ttd Feb 18, 2025
3c00714
[CI Pipeline] Released Snapshot version: 5.47.31-alpha-209-SNAPSHOT
Feb 18, 2025
be0e848
[CI Pipeline] Released Snapshot version: 5.47.32-alpha-151-SNAPSHOT
Feb 18, 2025
4499339
Fix feat-flag copy
abuabraham-ttd Feb 18, 2025
e34cb73
[CI Pipeline] Released Snapshot version: 5.47.33-alpha-157-SNAPSHOT
Feb 18, 2025
45c01d4
fix
abuabraham-ttd Feb 18, 2025
0b32945
[CI Pipeline] Released Snapshot version: 5.47.34-alpha-159-SNAPSHOT
Feb 18, 2025
8f03167
skip valiaditon fix
abuabraham-ttd Feb 19, 2025
3db4747
[CI Pipeline] Released Snapshot version: 5.47.35-alpha-210-SNAPSHOT
Feb 19, 2025
ee89f17
skip valiaditon fix
abuabraham-ttd Feb 19, 2025
e330cfe
add log
abuabraham-ttd Feb 19, 2025
be05343
add log
abuabraham-ttd Feb 19, 2025
304ddf7
[CI Pipeline] Released Snapshot version: 5.47.36-alpha-160-SNAPSHOT
Feb 19, 2025
ff1d646
See what value of config
abuabraham-ttd Feb 19, 2025
66d08ac
See what value of config
abuabraham-ttd Feb 19, 2025
b35e199
See what value of config
abuabraham-ttd Feb 19, 2025
5bf0e43
merge with main
abuabraham-ttd Feb 20, 2025
0583951
[CI Pipeline] Released Snapshot version: 5.47.48-alpha-211-SNAPSHOT
Feb 20, 2025
1db04e2
[CI Pipeline] Released Snapshot version: 5.47.49-alpha-162-SNAPSHOT
Feb 20, 2025
d9da9fe
[CI Pipeline] Released Snapshot version: 5.47.50-alpha-203-SNAPSHOT
Feb 20, 2025
e87b67b
[CI Pipeline] Released Snapshot version: 5.47.51-alpha-204-SNAPSHOT
Feb 20, 2025
be1c1d1
Random change
abuabraham-ttd Feb 20, 2025
7e45d1e
[CI Pipeline] Released Snapshot version: 5.47.52-alpha-163-SNAPSHOT
Feb 20, 2025
bd232a8
[CI Pipeline] Released Snapshot version: 5.47.53-alpha-212-SNAPSHOT
Feb 21, 2025
0d5a392
add missing config
abuabraham-ttd Feb 21, 2025
49c8b60
[CI Pipeline] Released Snapshot version: 5.47.54-alpha-164-SNAPSHOT
Feb 21, 2025
39c16d1
add missing config
abuabraham-ttd Feb 21, 2025
c5870f5
[CI Pipeline] Released Snapshot version: 5.47.55-alpha-165-SNAPSHOT
Feb 21, 2025
2af2642
add missing config
abuabraham-ttd Feb 21, 2025
6741cbf
[CI Pipeline] Released Snapshot version: 5.47.56-alpha-166-SNAPSHOT
Feb 21, 2025
92cabf2
[CI Pipeline] Released Snapshot version: 5.47.57-alpha-167-SNAPSHOT
Feb 21, 2025
3f1f09d
revert entrypoint
abuabraham-ttd Feb 21, 2025
a09573f
[CI Pipeline] Released Snapshot version: 5.47.58-alpha-168-SNAPSHOT
Feb 21, 2025
04f7c20
Add more logs
abuabraham-ttd Feb 21, 2025
37a7c51
[CI Pipeline] Released Snapshot version: 5.47.59-alpha-169-SNAPSHOT
Feb 21, 2025
5714cf2
More logs
abuabraham-ttd Feb 21, 2025
2179ef6
[CI Pipeline] Released Snapshot version: 5.47.60-alpha-170-SNAPSHOT
Feb 21, 2025
ba6dc41
More logs
abuabraham-ttd Feb 21, 2025
722bdd1
[CI Pipeline] Released Snapshot version: 5.47.61-alpha-171-SNAPSHOT
Feb 21, 2025
76e73aa
More logs
abuabraham-ttd Feb 21, 2025
8ab7874
[CI Pipeline] Released Snapshot version: 5.47.62-alpha-172-SNAPSHOT
Feb 21, 2025
6579f1c
Revert to old configs
abuabraham-ttd Feb 21, 2025
364ef1d
[CI Pipeline] Released Snapshot version: 5.47.63-alpha-173-SNAPSHOT
Feb 21, 2025
14d4b2b
Revert to old configs
abuabraham-ttd Feb 21, 2025
af81d04
[CI Pipeline] Released Snapshot version: 5.47.64-alpha-176-SNAPSHOT
Feb 21, 2025
0a3671f
update euid
abuabraham-ttd Feb 21, 2025
dfe01ae
update euid
abuabraham-ttd Feb 21, 2025
982fec1
update euid
abuabraham-ttd Feb 21, 2025
a97dfcb
[CI Pipeline] Released Snapshot version: 5.47.65-alpha-177-SNAPSHOT
Feb 21, 2025
4ab5aac
update shared action
abuabraham-ttd Feb 21, 2025
64730a3
Try with minimal config
abuabraham-ttd Feb 22, 2025
192ffd8
[CI Pipeline] Released Snapshot version: 5.47.66-alpha-178-SNAPSHOT
Feb 22, 2025
5dfd7c7
[CI Pipeline] Released Snapshot version: 5.47.67-alpha-213-SNAPSHOT
Feb 22, 2025
20fc7cd
[CI Pipeline] Released Snapshot version: 5.47.68-alpha-214-SNAPSHOT
Feb 22, 2025
cfb5082
[CI Pipeline] Released Snapshot version: 5.47.69-alpha-206-SNAPSHOT
Feb 22, 2025
aa841bf
[CI Pipeline] Released Snapshot version: 5.47.70-alpha-207-SNAPSHOT
Feb 22, 2025
0a38ebb
Try with minimal config
abuabraham-ttd Feb 22, 2025
c3ef203
Making Azure GCP behave same way
abuabraham-ttd Feb 22, 2025
e9f6691
[CI Pipeline] Released Snapshot version: 5.47.71-alpha-215-SNAPSHOT
Feb 22, 2025
0960ee6
Making Azure GCP behave same way
abuabraham-ttd Feb 22, 2025
dab022b
remove
abuabraham-ttd Feb 22, 2025
d755446
remove
abuabraham-ttd Feb 22, 2025
3218db2
Fix EUID
abuabraham-ttd Feb 22, 2025
6b47412
[CI Pipeline] Released Snapshot version: 5.47.72-alpha-179-SNAPSHOT
Feb 22, 2025
6b0342e
remove cat
abuabraham-ttd Feb 24, 2025
e3e14bb
[CI Pipeline] Released Snapshot version: 5.47.73-alpha-180-SNAPSHOT
Feb 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Makefile.eif
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,14 @@ euidoperator.eif: build_artifacts build_configs build/proxies.nitro.yaml build/s

.PHONY: build_configs

build_configs: build/conf/default-config.json build/conf/euid-integ-config.json build/conf/euid-prod-config.json build/conf/uid2-integ-config.json build/conf/uid2-prod-config.json build/conf/logback.xml build/conf/logback-debug.xml
build_configs: build/conf/default-config.json build/conf/feat-flag.json build/conf/euid-integ-config.json build/conf/euid-prod-config.json build/conf/uid2-integ-config.json build/conf/uid2-prod-config.json build/conf/logback.xml build/conf/logback-debug.xml

build/conf/default-config.json: build_artifacts ./scripts/aws/conf/default-config.json
cp ./scripts/aws/conf/default-config.json ./build/conf/

build/conf/feat-flag.json: build_artifacts ./scripts/aws/conf/feat-flag/feat-flag.json
cp ./scripts/aws/conf/feat-flag/feat-flag.json ./build/conf/

build/conf/euid-integ-config.json: build_artifacts ./scripts/aws/conf/euid-integ-config.json
cp ./scripts/aws/conf/euid-integ-config.json ./build/conf/

Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.uid2</groupId>
<artifactId>uid2-operator</artifactId>
<version>5.47.47</version>
<version>5.47.73-alpha-180-SNAPSHOT</version>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand All @@ -22,7 +22,7 @@
<enclave-aws.version>2.1.0</enclave-aws.version>
<enclave-azure.version>2.1.0</enclave-azure.version>
<enclave-gcp.version>2.1.0</enclave-gcp.version>
<uid2-shared.version>8.0.32</uid2-shared.version>
<uid2-shared.version>8.1.10</uid2-shared.version>
<image.version>${project.version}</image.version>
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>
Expand Down
2 changes: 1 addition & 1 deletion scripts/aws/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ COPY ./conf/default-config.json /app/conf/
COPY ./conf/*.json /app/conf/
COPY ./conf/*.xml /app/conf/
COPY ./syslog-ng-client.conf /etc/syslog-ng/syslog-ng.conf
COPY ./conf/feat-flag/feat-flag.json /app/conf/feat-flag/
COPY ./conf/feat-flag.json /app/conf/feat-flag/

RUN chmod +x /app/vsockpx && chmod +x /app/entrypoint.sh

Expand Down
7 changes: 5 additions & 2 deletions scripts/aws/conf/default-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,12 @@
"service_links_metadata_path": "service_links/metadata.json",
"optout_metadata_path": null,
"optout_inmem_cache": false,
"enclave_platform": null,
"enclave_platform": "aws-nitro",
"failure_shutdown_wait_hours": 120,
"sharing_token_expiry_seconds": 2592000,
"validate_service_links": false,
"identity_token_expires_after_seconds": 86400,
"refresh_token_expires_after_seconds": 2592000,
"refresh_identity_token_after_seconds": 3600,
"operator_type": "private"
}
}
9 changes: 1 addition & 8 deletions scripts/aws/conf/euid-integ-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,5 @@
"core_attest_url": "https://core.integ.euid.eu/attest",
"optout_api_uri": "https://optout.integ.euid.eu/optout/replicate",
"optout_s3_folder": "optout/",
"allow_legacy_api": false,
"runtime_config_store": {
"type": "http",
"config" : {
"url": "https://core.integ.euid.eu/operator/config"
},
"config_scan_period_ms": 300000
}
"allow_legacy_api": false
}
18 changes: 5 additions & 13 deletions scripts/aws/conf/uid2-integ-config.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,14 @@
{
"core_attest_url": "https://core-integ.uidapi.com/attest",
"optout_api_uri": "https://optout-integ.uidapi.com/optout/replicate",
"sites_metadata_path": "https://core-integ.uidapi.com/sites/refresh",
"clients_metadata_path": "https://core-integ.uidapi.com/clients/refresh",
"client_side_keypairs_metadata_path": "https://core-integ.uidapi.com/client_side_keypairs/refresh",
"keysets_metadata_path": "https://core-integ.uidapi.com/key/keyset/refresh",
"keyset_keys_metadata_path": "https://core-integ.uidapi.com/key/keyset-keys/refresh",
"client_side_keypairs_metadata_path": "https://core-integ.uidapi.com/client_side_keypairs/refresh",
"salts_metadata_path": "https://core-integ.uidapi.com/salt/refresh",
"services_metadata_path": "https://core-integ.uidapi.com/services/refresh",
"service_links_metadata_path": "https://core-integ.uidapi.com/service_links/refresh",
"optout_metadata_path": "https://optout-integ.uidapi.com/optout/refresh",
"core_attest_url": "https://core-integ.uidapi.com/attest",
"optout_api_uri": "https://optout-integ.uidapi.com/optout/replicate",
"optout_s3_folder": "uid-optout-integ/",
"allow_legacy_api": false,
"runtime_config_store": {
"type": "http",
"config" : {
"url": "https://core-integ.uidapi.com/operator/config"
},
"config_scan_period_ms": 300000
}
}
"optout_s3_folder": "uid-optout-integ/"
}
2 changes: 1 addition & 1 deletion scripts/aws/ec2.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import sys
import time
import yaml

logging.basicConfig(level=logging.INFO)
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from confidential_compute import ConfidentialCompute, ConfidentialComputeConfig, InstanceProfileMissingError, OperatorKeyNotFoundError, ConfigurationValueError, ConfidentialComputeStartupError

Expand Down
36 changes: 16 additions & 20 deletions scripts/aws/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,18 @@ exec &> >(tee -a "$LOG_FILE")
PARAMETERIZED_CONFIG="/app/conf/config-overrides.json"
OPERATOR_CONFIG="/tmp/final-config.json"

setup_auxiliaries() {
set -o pipefail
ulimit -n 65536
set -o pipefail
ulimit -n 65536

# -- setup loopback device
echo "Setting up loopback device..."
ifconfig lo 127.0.0.1
# -- setup loopback device
echo "Setting up loopback device..."
ifconfig lo 127.0.0.1

# -- start vsock proxy
echo "Starting vsock proxy..."
/app/vsockpx --config /app/proxies.nitro.yaml --daemon --workers $(( ( $(nproc) + 3 ) / 4 )) --log-level 3

/usr/sbin/syslog-ng --verbose
}
# -- start vsock proxy
echo "Starting vsock proxy..."
/app/vsockpx --config /app/proxies.nitro.yaml --daemon --workers $(( ( $(nproc) + 3 ) / 4 )) --log-level 3

/usr/sbin/syslog-ng --verbose

build_parameterized_config() {
curl -s -f -o "${PARAMETERIZED_CONFIG}" -x socks5h://127.0.0.1:3305 http://127.0.0.1:27015/getConfig
Expand All @@ -46,9 +43,7 @@ build_parameterized_config() {

build_operator_config() {
CORE_BASE_URL=$(jq -r ".core_base_url" < "${PARAMETERIZED_CONFIG}")
CORE_BASE_URL=$(echo "$CORE_BASE_URL" | sed -E 's#^(https?://)?([^/]+).*#\2#')
OPTOUT_BASE_URL=$(jq -r ".optout_base_url" < "${PARAMETERIZED_CONFIG}")
OPTOUT_BASE_URL=$(echo "$OPTOUT_BASE_URL" | sed -E 's#^(https?://)?([^/]+).*#\2#')
DEPLOYMENT_ENVIRONMENT=$(jq -r ".environment" < "${PARAMETERIZED_CONFIG}")
DEBUG_MODE=$(jq -r ".debug_mode" < "${PARAMETERIZED_CONFIG}")

Expand All @@ -69,22 +64,22 @@ build_operator_config() {

if [[ "$DEPLOYMENT_ENVIRONMENT" != "prod" ]]; then
#Allow override of base URL in non-prod environments
CORE_PATTERN="core.*uidapi.com"
OPTOUT_PATTERN="optout.*uidapi.com"
if [[ "$DEPLOYMENT_ENVIRONMENT" == "euid" ]]; then
CORE_PATTERN="core.*euid.eu"
OPTOUT_PATTERN="optout.*euid.eu"
CORE_PATTERN="https://core.*uidapi.com"
OPTOUT_PATTERN="https://optout.*uidapi.com"
if [[ "$IDENTITY_SCOPE_LOWER" == "euid" ]]; then
CORE_PATTERN="https://core.*euid.eu"
OPTOUT_PATTERN="https://optout.*euid.eu"
fi
sed -i "s#${CORE_PATTERN}#${CORE_BASE_URL}#g" "${OPERATOR_CONFIG}"
sed -i "s#${OPTOUT_PATTERN}#${OPTOUT_BASE_URL}#g" "${OPERATOR_CONFIG}"
fi

}

setup_auxiliaries
build_parameterized_config
build_operator_config


DEBUG_MODE=$(jq -r ".debug_mode" < "${OPERATOR_CONFIG}")
LOGBACK_CONF="./conf/logback.xml"

Expand All @@ -107,3 +102,4 @@ java \
-Dlogback.configurationFile=${LOGBACK_CONF} \
-Dhttp_proxy=socks5://127.0.0.1:3305 \
-jar /app/"${JAR_NAME}"-"${JAR_VERSION}".jar

38 changes: 13 additions & 25 deletions scripts/azure-cc/azureEntryPoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import shutil
import requests
import logging
from urllib.parse import urlparse
from confidential_compute import ConfidentialCompute, ConfigurationMissingError, OperatorKeyPermissionError, OperatorKeyNotFoundError, ConfidentialComputeStartupError
from azure.keyvault.secrets import SecretClient
from azure.identity import DefaultAzureCredential, CredentialUnavailableError
Expand All @@ -22,6 +21,8 @@ class AzureEntryPoint(ConfidentialCompute):
env_name = os.getenv("DEPLOYMENT_ENVIRONMENT")
jar_name = os.getenv("JAR_NAME", "default-jar-name")
jar_version = os.getenv("JAR_VERSION", "default-jar-version")
default_core_endpoint = f"https://core-{env_name}.uidapi.com".lower()
default_optout_endpoint = f"https://optout-{env_name}.uidapi.com".lower()

FINAL_CONFIG = "/tmp/final-config.json"

Expand Down Expand Up @@ -50,37 +51,25 @@ def __create_final_config(self):
except IOError as e:
logging.error(f"Failed to create {AzureEntryPoint.FINAL_CONFIG} with error: {e}")
sys.exit(1)

CORE_BASE_URL = os.getenv("CORE_BASE_URL")
OPTOUT_BASE_URL = os.getenv("OPTOUT_BASE_URL")

if CORE_BASE_URL and OPTOUT_BASE_URL and AzureEntryPoint.env_name != 'prod':
logging.info(f"-- replacing URLs by {CORE_BASE_URL} and {OPTOUT_BASE_URL}")
with open(AzureEntryPoint.FINAL_CONFIG, "r") as file:
config = file.read()

config = config.replace("core-integ.uidapi.com", urlparse(CORE_BASE_URL).netloc)
config = config.replace("optout-integ.uidapi.com", urlparse(OPTOUT_BASE_URL).netloc)
logging.info(f"-- replacing URLs by {self.configs["core_base_url"]} and {self.configs["optout_base_url"]}")
with open(AzureEntryPoint.FINAL_CONFIG, "r") as file:
config = file.read()

with open(AzureEntryPoint.FINAL_CONFIG, "w") as file:
file.write(config)
config = config.replace("https://core.uidapi.com", self.configs["core_base_url"])
config = config.replace("https://optout.uidapi.com", self.configs["optout_base_url"])
with open(AzureEntryPoint.FINAL_CONFIG, "w") as file:
file.write(config)

with open(AzureEntryPoint.FINAL_CONFIG, "r") as file:
logging.info(file.read())

def __set_base_urls(self):
with open(AzureEntryPoint.FINAL_CONFIG, "r") as file:
jdata = json.load(file)
self.configs["core_base_url"] = jdata["core_attest_url"]
self.configs["optout_base_url"] = jdata["optout_api_uri"]

def __set_operator_key(self):
try:
credential = DefaultAzureCredential()
kv_URL = f"https://{AzureEntryPoint.kv_name}.vault.azure.net"
secret_client = SecretClient(vault_url=kv_URL, credential=credential)
secret = secret_client.get_secret(AzureEntryPoint.secret_name)
# print(f"Secret Value: {secret.value}")
self.configs["operator_key"] = secret.value

except (CredentialUnavailableError, ClientAuthenticationError) as auth_error:
Expand All @@ -92,14 +81,13 @@ def __set_operator_key(self):


def _set_confidential_config(self, secret_identifier: str = None):
"""Builds and sets ConfidentialComputeConfig"""
self.configs["skip_validations"] = os.getenv("SKIP_VALIDATIONS", "false").lower() == "true"
self.configs["debug_mode"] = os.getenv("DEBUG_MODE", "false").lower() == "true"
self.configs["environment"] = AzureEntryPoint.env_name

# set self.configs["operator_key"]
self.configs["core_base_url"] = os.getenv("CORE_BASE_URL") if os.getenv("CORE_BASE_URL") and AzureEntryPoint.env_name == "integ" else AzureEntryPoint.default_core_endpoint
self.configs["optout_base_url"] = os.getenv("OPTOUT_BASE_URL") if os.getenv("OPTOUT_BASE_URL") and AzureEntryPoint.env_name == "integ" else AzureEntryPoint.default_optout_endpoint
self.__set_operator_key()
# set base urls from final config file
self.__set_base_urls()

def __run_operator(self):

Expand Down Expand Up @@ -150,10 +138,10 @@ def _validate_auxiliaries(self):
def run_compute(self) -> None:
"""Main execution flow for confidential compute."""
self.__check_env_variables()
self.__create_final_config()
self._set_confidential_config()
if not self.configs.get("skip_validations"):
self.validate_configuration()
self.__create_final_config()
self._setup_auxiliaries()
self.__run_operator()

Expand Down
24 changes: 12 additions & 12 deletions scripts/azure-cc/conf/integ-uid2-config.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"sites_metadata_path": "https://core-integ.uidapi.com/sites/refresh",
"clients_metadata_path": "https://core-integ.uidapi.com/clients/refresh",
"keysets_metadata_path": "https://core-integ.uidapi.com/key/keyset/refresh",
"keyset_keys_metadata_path": "https://core-integ.uidapi.com/key/keyset-keys/refresh",
"client_side_keypairs_metadata_path": "https://core-integ.uidapi.com/client_side_keypairs/refresh",
"salts_metadata_path": "https://core-integ.uidapi.com/salt/refresh",
"services_metadata_path": "https://core-integ.uidapi.com/services/refresh",
"service_links_metadata_path": "https://core-integ.uidapi.com/service_links/refresh",
"optout_metadata_path": "https://optout-integ.uidapi.com/optout/refresh",
"core_attest_url": "https://core-integ.uidapi.com/attest",
"optout_api_uri": "https://optout-integ.uidapi.com/optout/replicate",
"sites_metadata_path": "https://core.uidapi.com/sites/refresh",
"clients_metadata_path": "https://core.uidapi.com/clients/refresh",
"keysets_metadata_path": "https://core.uidapi.com/key/keyset/refresh",
"keyset_keys_metadata_path": "https://core.uidapi.com/key/keyset-keys/refresh",
"client_side_keypairs_metadata_path": "https://core.uidapi.com/client_side_keypairs/refresh",
"salts_metadata_path": "https://core.uidapi.com/salt/refresh",
"services_metadata_path": "https://core.uidapi.com/services/refresh",
"service_links_metadata_path": "https://core.uidapi.com/service_links/refresh",
"optout_metadata_path": "https://optout.uidapi.com/optout/refresh",
"core_attest_url": "https://core.uidapi.com/attest",
"optout_api_uri": "https://optout.uidapi.com/optout/replicate",
"optout_s3_folder": "uid-optout-integ/",
"runtime_config_store": {
"type": "http",
"config" : {
"url": "https://core-integ.uidapi.com/operator/config"
"url": "https://core.uidapi.com/operator/config"
},
"config_scan_period_ms": 300000
}
Expand Down
24 changes: 12 additions & 12 deletions scripts/azure-cc/conf/prod-uid2-config.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
{
"sites_metadata_path": "https://core-prod.uidapi.com/sites/refresh",
"clients_metadata_path": "https://core-prod.uidapi.com/clients/refresh",
"keysets_metadata_path": "https://core-prod.uidapi.com/key/keyset/refresh",
"keyset_keys_metadata_path": "https://core-prod.uidapi.com/key/keyset-keys/refresh",
"client_side_keypairs_metadata_path": "https://core-prod.uidapi.com/client_side_keypairs/refresh",
"salts_metadata_path": "https://core-prod.uidapi.com/salt/refresh",
"services_metadata_path": "https://core-prod.uidapi.com/services/refresh",
"service_links_metadata_path": "https://core-prod.uidapi.com/service_links/refresh",
"optout_metadata_path": "https://optout-prod.uidapi.com/optout/refresh",
"core_attest_url": "https://core-prod.uidapi.com/attest",
"optout_api_uri": "https://optout-prod.uidapi.com/optout/replicate",
"sites_metadata_path": "https://core.uidapi.com/sites/refresh",
"clients_metadata_path": "https://core.uidapi.com/clients/refresh",
"keysets_metadata_path": "https://core.uidapi.com/key/keyset/refresh",
"keyset_keys_metadata_path": "https://core.uidapi.com/key/keyset-keys/refresh",
"client_side_keypairs_metadata_path": "https://core.uidapi.com/client_side_keypairs/refresh",
"salts_metadata_path": "https://core.uidapi.com/salt/refresh",
"services_metadata_path": "https://core.uidapi.com/services/refresh",
"service_links_metadata_path": "https://core.uidapi.com/service_links/refresh",
"optout_metadata_path": "https://optout.uidapi.com/optout/refresh",
"core_attest_url": "https://core.uidapi.com/attest",
"optout_api_uri": "https://optout.uidapi.com/optout/replicate",
"optout_s3_folder": "optout-v2/",
"identity_token_expires_after_seconds": 259200,
"runtime_config_store": {
"type": "http",
"config" : {
"url": "https://core-prod.uidapi.com/operator/config"
"url": "https://core.uidapi.com/operator/config"
},
"config_scan_period_ms": 300000
}
Expand Down
4 changes: 2 additions & 2 deletions scripts/confidential_compute.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def validate_connectivity() -> None:

type_hints = get_type_hints(ConfidentialComputeConfig, include_extras=True)
required_keys = [field for field, hint in type_hints.items() if "NotRequired" not in str(hint)]
missing_keys = [key for key in required_keys if key not in self.configs]
missing_keys = [key for key in required_keys if key not in self.configs or self.configs[key] == None]
if missing_keys:
raise ConfigurationMissingError(self.__class__.__name__, missing_keys)

Expand Down Expand Up @@ -144,7 +144,7 @@ def run_command(command, separate_process=False):
if separate_process:
subprocess.Popen(command, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
else:
subprocess.run(command,check=True)
subprocess.run(command,check=True,text=True)
except Exception as e:
logging.error(f"Failed to run command: {e}", exc_info=True)
raise RuntimeError (f"Failed to start {' '.join(command)} ")
6 changes: 2 additions & 4 deletions scripts/gcp-oidc/gcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@
import sys
import logging
from google.cloud import secretmanager
from google.auth import default
from google.auth.exceptions import DefaultCredentialsError
from google.api_core.exceptions import PermissionDenied, NotFound
from urllib.parse import urlparse
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from confidential_compute import ConfidentialCompute, ConfidentialComputeConfig, ConfigurationMissingError, OperatorKeyNotFoundError, OperatorKeyPermissionError, ConfidentialComputeStartupError

Expand Down Expand Up @@ -50,8 +48,8 @@ def __populate_operator_config(self, destination):
shutil.copy(target_config, destination)
with open(destination, 'r') as file:
config = file.read()
config = config.replace("core.uidapi.com", urlparse(self.configs.get("core_base_url")).netloc)
config = config.replace("optout.uidapi.com", urlparse(self.configs.get("optout_base_url")).netloc)
config = config.replace("https://core.uidapi.com", self.configs.get("core_base_url"))
config = config.replace("https://optout.uidapi.com", self.configs.get("optout_base_url"))
with open(destination, 'w') as file:
file.write(config)

Expand Down
Loading