Skip to content

Commit 961fec4

Browse files
committed
chore: Run TCK with user authentication
Signed-off-by: Jeff Mesnil <jmesnil@ibm.com>
1 parent 50750cf commit 961fec4

3 files changed

Lines changed: 18 additions & 11 deletions

File tree

.github/workflows/run-tck-1.0-wip.yml

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ on:
55
push:
66
branches:
77
- main
8-
#pull_request:
9-
# branches:
10-
# - main
8+
pull_request:
9+
branches:
10+
- main
1111
workflow_dispatch:
1212

1313
env:
@@ -64,8 +64,12 @@ jobs:
6464
working-directory: tck/a2a-tck
6565
- name: Build with Maven, skipping tests
6666
run: mvn -B install -DskipTests
67+
- name: Generate random password
68+
run: |
69+
A2A_PASSWORD=$(openssl rand -base64 16)
70+
echo "A2A_PASSWORD=$A2A_PASSWORD" >> $GITHUB_ENV
6771
- name: Start SUT
68-
run: SUT_GRPC_URL=${{ env.SUT_JSONRPC_URL }} SUT_REST_URL=${{ env.SUT_JSONRPC_URL }} mvn -B quarkus:dev & #SUT_JSONRPC_URL already set
72+
run: SUT_GRPC_URL=${{ env.SUT_JSONRPC_URL }} SUT_REST_URL=${{ env.SUT_JSONRPC_URL }} mvn -B quarkus:dev -Dquarkus.security.users.embedded.users.alice=${A2A_PASSWORD} &
6973
working-directory: tck
7074
- name: Wait for SUT to start
7175
run: |
@@ -101,12 +105,16 @@ jobs:
101105
sleep "$RETRY_INTERVAL"
102106
done
103107
104-
- name: Run TCK (JSONRPC)
108+
- name: Run TCK
105109
id: run-tck
106-
timeout-minutes: 5
110+
timeout-minutes: 10
107111
run: |
108112
set -o pipefail
109-
./run_tck.py --sut-url ${{ env.SUT_JSONRPC_URL }} --category all --transports jsonrpc --compliance-report report.json 2>&1 | tee tck-output.log
113+
export PYTHONUNBUFFERED=1
114+
A2A_AUTH_TYPE=basic \
115+
A2A_AUTH_USERNAME=alice \
116+
A2A_AUTH_PASSWORD=$A2A_PASSWORD \
117+
./run_tck.py --sut-url ${{ env.SUT_JSONRPC_URL }} --category all --transports jsonrpc,grpc,rest --compliance-report report.json 2>&1 | tee tck-output.log
110118
working-directory: tck/a2a-tck
111119
- name: Capture Diagnostics on Failure
112120
if: failure()

tck/src/main/java/io/a2a/tck/server/AgentCardProducer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ public AgentCard agentCard() {
4242
.capabilities(AgentCapabilities.builder()
4343
.streaming(true)
4444
.pushNotifications(true)
45+
.extendedAgentCard(true)
4546
.build())
4647
.securitySchemes(Map.of("acme", HTTPAuthSecurityScheme.builder()
4748
.scheme("basic")
4849
.build()))
49-
.security(List.of(Map.of("acme", Collections.emptyList())))
50-
.supportsExtendedAgentCard(true)
50+
.securityRequirements(List.of(Map.of("acme", Collections.emptyList())))
5151
.defaultInputModes(Collections.singletonList("text"))
5252
.defaultOutputModes(Collections.singletonList("text"))
5353
.skills(Collections.singletonList(AgentSkill.builder()

tck/src/main/resources/application.properties

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,4 @@ quarkus.log.console.level=INFO
2323
# Enable basic authentication
2424
quarkus.http.auth.basic=true
2525
quarkus.security.users.embedded.enabled=true
26-
quarkus.security.users.embedded.plain-text=true
27-
quarkus.security.users.embedded.users.alice=a2a-p4ssw0rd
26+
quarkus.security.users.embedded.plain-text=true

0 commit comments

Comments
 (0)