Skip to content

Commit

Permalink
Remove -ttl from integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
heymarcel committed Sep 11, 2024
1 parent 131234c commit 4aee4e4
Show file tree
Hide file tree
Showing 22 changed files with 39 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ docker compose exec -T spire-server \
-parentID "spiffe://domain.test/spire/agent/x509pop/$(fingerprint conf/agent/agent.crt.pem)" \
-spiffeID "spiffe://domain.test/workload" \
-selector "windows:user_name:User Manager\ContainerUser" \
-ttl 0
-x509SVIDTTL 0

assert-synced-entry "spiffe://domain.test/workload"
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ docker compose exec -T spire-server \
-parentID "spiffe://domain.test/spire/agent/x509pop/$(fingerprint conf/agent/agent.crt.pem)" \
-spiffeID "spiffe://domain.test/workload" \
-selector "windows:user_name:User Manager\ContainerUser" \
-ttl 0
-x509SVIDTTL 0

check-synced-entry "spire-agent" "spiffe://domain.test/workload"

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ docker compose exec -T spire-server-a \
-spiffeID "spiffe://domain-a.test/admin" \
-selector "unix:uid:1001" \
-admin \
-ttl 0
-x509SVIDTTL 0
check-synced-entry "spire-agent-a" "spiffe://domain-a.test/admin"

log-debug "creating foreign admin registration entry..."
Expand All @@ -17,7 +17,7 @@ docker compose exec -T spire-server-b \
-spiffeID "spiffe://domain-b.test/admin" \
-selector "unix:uid:1003" \
-federatesWith "spiffe://domain-a.test" \
-ttl 0
-x509SVIDTTL 0
check-synced-entry "spire-agent-b" "spiffe://domain-b.test/admin"

log-debug "creating regular registration entry..."
Expand All @@ -26,5 +26,5 @@ docker compose exec -T spire-server-a \
-parentID "spiffe://domain-a.test/spire/agent/x509pop/$(fingerprint conf/domain-a/agent/agent.crt.pem)" \
-spiffeID "spiffe://domain-a.test/workload" \
-selector "unix:uid:1002" \
-ttl 0
-x509SVIDTTL 0
check-synced-entry "spire-agent-a" "spiffe://domain-a.test/workload"
2 changes: 1 addition & 1 deletion test/integration/suites/agent-cli/07-check-api-watch
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ docker compose exec -T spire-server \
-parentID "spiffe://domain.test/spire/agent/x509pop/$(fingerprint conf/agent/agent.crt.pem)" \
-spiffeID "spiffe://domain.test/workload-$m" \
-selector "unix:uid:1001" \
-ttl 20 &
-x509SVIDTTL 20 &

# Get the PID of the last background process
API_WATCH_PID=$!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ docker compose exec -T spire-server \
-spiffeID "spiffe://domain.test/admin" \
-selector "unix:uid:1001" \
-admin \
-ttl 0
-x509SVIDTTL 0
check-synced-entry "spire-agent" "spiffe://domain.test/admin"

log-debug "creating regular registration entry..."
Expand All @@ -16,6 +16,6 @@ docker compose exec -T spire-server \
-parentID "spiffe://domain.test/spire/agent/x509pop/$(fingerprint conf/agent/agent.crt.pem)" \
-spiffeID "spiffe://domain.test/workload" \
-selector "unix:uid:1002" \
-ttl 0
-x509SVIDTTL 0
check-synced-entry "spire-agent" "spiffe://domain.test/workload"

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ docker compose exec -T spire-server \
-parentID "spiffe://domain.test/spire/agent/x509pop/$(fingerprint conf/agent/agent.crt.pem)" \
-spiffeID "spiffe://domain.test/authorized_delegate" \
-selector "unix:uid:1001" \
-ttl 0
-x509SVIDTTL 0
check-synced-entry "spire-agent" "spiffe://domain.test/authorized_delegate"

log-debug "creating registration entry for workload..."
Expand All @@ -15,5 +15,5 @@ docker compose exec -T spire-server \
-parentID "spiffe://domain.test/spire/agent/x509pop/$(fingerprint conf/agent/agent.crt.pem)" \
-spiffeID "spiffe://domain.test/workload" \
-selector "unix:uid:1002" \
-ttl 0
-x509SVIDTTL 0
check-synced-entry "spire-agent" "spiffe://domain.test/workload"
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ docker compose exec -T spire-server \
-spiffeID "spiffe://domain.test/downstream" \
-selector "unix:uid:1001" \
-downstream \
-ttl 0
-x509SVIDTTL 0
check-synced-entry "spire-agent" "spiffe://domain.test/downstream"

log-debug "creating workload registration entry..."
Expand All @@ -16,6 +16,6 @@ docker compose exec -T spire-server \
-parentID "spiffe://domain.test/spire/agent/x509pop/$(fingerprint conf/agent/agent.crt.pem)" \
-spiffeID "spiffe://domain.test/workload" \
-selector "unix:uid:1002" \
-ttl 0
-x509SVIDTTL 0
check-synced-entry "spire-agent" "spiffe://domain.test/workload"

Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ setup-tests() {
-spiffeID "spiffe://federated-domain.test/downstream-proxy" \
-selector "unix:uid:0" \
-federatesWith "spiffe://domain.test" \
-ttl 0
-x509SVIDTTL 0

log-debug "creating registration entry for upstream proxy..."
docker compose exec -T upstream-spire-server \
Expand All @@ -68,15 +68,15 @@ setup-tests() {
-spiffeID "spiffe://domain.test/upstream-proxy" \
-selector "unix:uid:0" \
-federatesWith "spiffe://federated-domain.test" \
-ttl 0
-x509SVIDTTL 0

log-debug "creating registration entry for downstream proxy..."
docker compose exec -T upstream-spire-server \
/opt/spire/bin/spire-server entry create \
-parentID "spiffe://domain.test/spire/agent/x509pop/$(fingerprint conf/downstream/agent/agent.crt.pem)" \
-spiffeID "spiffe://domain.test/downstream-proxy" \
-selector "unix:uid:0" \
-ttl 0
-x509SVIDTTL 0
}

test-envoy() {
Expand Down
4 changes: 2 additions & 2 deletions test/integration/suites/envoy-sds-v3/00-test-envoy-releases
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ setup-tests() {
-parentID "spiffe://domain.test/spire/agent/x509pop/$(fingerprint conf/upstream-agent/agent.crt.pem)" \
-spiffeID "spiffe://domain.test/upstream-workload" \
-selector "unix:uid:0" \
-ttl 0
-x509SVIDTTL 0

log-debug "creating registration entry for downstream workload..."
docker compose exec -T spire-server \
/opt/spire/bin/spire-server entry create \
-parentID "spiffe://domain.test/spire/agent/x509pop/$(fingerprint conf/downstream-agent/agent.crt.pem)" \
-spiffeID "spiffe://domain.test/downstream-workload" \
-selector "unix:uid:0" \
-ttl 0
-x509SVIDTTL 0
}

test-envoy() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ for ((m=1;m<=$SIZE;m++)); do
-parentID "spiffe://domain.test/spire/agent/x509pop/$(fingerprint conf/agent/agent.crt.pem)" \
-spiffeID "spiffe://domain.test/workload-$m" \
-selector "unix:uid:1001" \
-ttl 0 &
-x509SVIDTTL 0 &
done

for ((m=1;m<=$SIZE;m++)); do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ for ((m=1;m<=$SIZE;m++)); do
-parentID "spiffe://domain.test/spire/agent/x509pop/$(fingerprint conf/agent/agent.crt.pem)" \
-spiffeID "spiffe://domain.test/workload/$m" \
-selector "unix:uid:1002" \
-ttl 0 &
-x509SVIDTTL 0 &
done

for ((m=1;m<=$SIZE;m++)); do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ docker compose exec -T downstream-spire-server \
-spiffeID "spiffe://downstream-domain.test/downstream-workload" \
-selector "unix:uid:0" \
-federatesWith "spiffe://upstream-domain.test" \
-ttl 0
-x509SVIDTTL 0

log-debug "creating registration entry for upstream workload..."
docker compose exec -T upstream-spire-server \
Expand All @@ -18,4 +18,4 @@ docker compose exec -T upstream-spire-server \
-spiffeID "spiffe://upstream-domain.test/upstream-workload" \
-selector "unix:uid:0" \
-federatesWith "spiffe://downstream-domain.test" \
-ttl 0
-x509SVIDTTL 0
4 changes: 3 additions & 1 deletion test/integration/suites/join-token/04-create-workload-entry
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ docker compose exec -T spire-server \
-parentID "spiffe://domain.test/node" \
-spiffeID "spiffe://domain.test/workload" \
-selector "unix:uid:0" \
-ttl 0
-x509SVIDTTL 0 \
-jwtSVIDTTL 0


# Check at most 30 times (with one second in between) that the agent has
# successfully synced down the workload entry.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ docker compose exec -T root-server \
-spiffeID "spiffe://domain.test/intermediateA" \
-selector "docker:label:org.integration.name:intermediateA" \
-downstream \
-ttl 3600
-x509SVIDTTL 3600
check-synced-entry "root-agent" "spiffe://domain.test/intermediateA"

log-debug "creating intermediateB downstream registration entry..."
Expand All @@ -17,5 +17,5 @@ docker compose exec -T root-server \
-spiffeID "spiffe://domain.test/intermediateB" \
-selector "docker:label:org.integration.name:intermediateB" \
-downstream \
-ttl 3600
-x509SVIDTTL 3600
check-synced-entry "root-agent" "spiffe://domain.test/intermediateB"
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ docker compose exec -T intermediateA-server \
-spiffeID "spiffe://domain.test/leafA" \
-selector "docker:label:org.integration.name:leafA" \
-downstream \
-ttl 90
-x509SVIDTTL 90

check-synced-entry "intermediateA-agent" "spiffe://domain.test/leafA"
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ docker compose exec -T intermediateB-server \
-spiffeID "spiffe://domain.test/leafB" \
-selector "docker:label:org.integration.name:leafB" \
-downstream \
-ttl 90
-x509SVIDTTL 90

check-synced-entry "intermediateB-agent" "spiffe://domain.test/leafB"
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ docker compose exec -T intermediateA-server \
-parentID "spiffe://domain.test/spire/agent/x509pop/$(fingerprint intermediateA/agent/agent.crt.pem)" \
-spiffeID "spiffe://domain.test/intermediateA/workload" \
-selector "unix:uid:1001" \
-ttl 0
-x509SVIDTTL 0
check-synced-entry "intermediateA-agent" "spiffe://domain.test/intermediateA/workload"

log-debug "creating leafA workload registration entry..."
Expand All @@ -15,7 +15,7 @@ docker compose exec -T leafA-server \
-parentID "spiffe://domain.test/spire/agent/x509pop/$(fingerprint leafA/agent/agent.crt.pem)" \
-spiffeID "spiffe://domain.test/leafA/workload" \
-selector "unix:uid:1001" \
-ttl 0
-x509SVIDTTL 0
check-synced-entry "leafA-agent" "spiffe://domain.test/leafA/workload"

log-debug "creating intermediateB workload registration entry..."
Expand All @@ -24,7 +24,7 @@ docker compose exec -T intermediateB-server \
-parentID "spiffe://domain.test/spire/agent/x509pop/$(fingerprint intermediateB/agent/agent.crt.pem)" \
-spiffeID "spiffe://domain.test/intermediateB/workload" \
-selector "unix:uid:1001" \
-ttl 0
-x509SVIDTTL 0
check-synced-entry "intermediateB-agent" "spiffe://domain.test/intermediateB/workload"

log-debug "creating leafB workload registration entry..."
Expand All @@ -33,5 +33,5 @@ docker compose exec -T leafB-server \
-parentID "spiffe://domain.test/spire/agent/x509pop/$(fingerprint leafB/agent/agent.crt.pem)" \
-spiffeID "spiffe://domain.test/leafB/workload" \
-selector "unix:uid:1001" \
-ttl 0
-x509SVIDTTL 0
check-synced-entry "leafB-agent" "spiffe://domain.test/leafB/workload"
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ docker compose exec -T spire-server \
-spiffeID "spiffe://domain.test/admin" \
-selector "unix:uid:1000" \
-admin \
-ttl 0
-x509SVIDTTL 0
check-synced-entry "spire-agent" "spiffe://domain.test/admin"

log-debug "running x509pop test..."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ docker compose exec -T spire-server \
-parentID "spiffe://domain.test/spire/agent/x509pop/$(fingerprint conf/agent/agent.crt.pem)" \
-spiffeID "spiffe://domain.test/oidc-provider" \
-selector "docker:label:org.integration.name:oidc-discovery-provider" \
-ttl 0
-x509SVIDTTL 0 \
-jwtSVIDTTL 0

check-synced-entry "spire-agent" "spiffe://domain.test/oidc-provider"

Expand Down
2 changes: 1 addition & 1 deletion test/integration/suites/rotation/04-create-workload-entry
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ docker compose exec -T spire-server \
-parentID "spiffe://domain.test/spire/agent/x509pop/$(fingerprint conf/agent/agent.crt.pem)" \
-spiffeID "spiffe://domain.test/workload" \
-selector "unix:uid:0" \
-ttl 0
-x509SVIDTTL 0

# Check at most 30 times (with one second in between) that the agent has
# successfully synced down the workload entry.
Expand Down
4 changes: 2 additions & 2 deletions test/integration/suites/spire-server-cli/03-entry
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ docker compose exec -T spire-server \
-spiffeID spiffe://domain.test/otherChild \
-node \
-dns dnsname1 \
-ttl 123 || fail-now "failed to create entry 3"
-x509SVIDTTL 123 || fail-now "failed to create entry 3"

# Verify entry count correctly indicates three entries
docker compose exec -T spire-server /opt/spire/bin/spire-server entry count | grep 3 || fail-now "failed to count 3 entries"
Expand Down Expand Up @@ -139,7 +139,7 @@ docker compose exec -T spire-server \
-parentID spiffe://domain.test/parent \
-spiffeID spiffe://domain.test/child1 \
-federatesWith spiffe://federated1.test \
-ttl 456 || fail-now "failed to update entry 1"
-x509SVIDTTL 456 || fail-now "failed to update entry 1"

docker compose exec -T spire-server \
/opt/spire/bin/spire-server entry update \
Expand Down
2 changes: 1 addition & 1 deletion test/integration/suites/upgrade/01-run-upgrade-tests
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ create-registration-entry() {
-parentID "spiffe://domain.test/spire/agent/x509pop/$(fingerprint conf/agent/agent.crt.pem)" \
-spiffeID "spiffe://domain.test/workload" \
-selector "unix:uid:${UID}" \
-ttl 0
-x509SVIDTTL 0

# Check at most 30 times (with one second in between) that the agent has
# successfully synced down the workload entry.
Expand Down

0 comments on commit 4aee4e4

Please sign in to comment.