Skip to content

Commit d58a6ed

Browse files
lo-simongarethsbjonathan-r-thorpe
authored
Add IS-10 support (#333)
* Add IS-10 support * Do tests with authorization enabled * IS-09-01, test_06 to test_12 are disable for authorization test * Bump up jwt-cpp to v0.7.0 * Link jwt-cpp library to nmos-cpp-test * Add Windows 2022 and Ubuntu 22.04 targets without authorization. * Update Readme --------- Co-authored-by: Gareth Sylvester-Bradley <[email protected]> Co-authored-by: jonathan-r-thorpe <[email protected]> Co-authored-by: Jonathan Thorpe (Sony) <[email protected]>
1 parent 647d4b3 commit d58a6ed

File tree

119 files changed

+12749
-276
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+12749
-276
lines changed

Diff for: .github/workflows/build-test.yml

+95-38
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ env:
1212
SECRET_RESULTS_SHEET_ID: ${{ secrets.RESULTS_SHEET_ID }}
1313
jobs:
1414
build_and_test:
15-
name: '${{ matrix.os }}: build and test (install mdns: ${{ matrix.install_mdns }}, use conan: ${{ matrix.use_conan }}, force cpprest asio: ${{ matrix.force_cpprest_asio }}, dns-sd mode: ${{ matrix.dns_sd_mode}})'
15+
name: '${{ matrix.os }}: build and test (install mdns: ${{ matrix.install_mdns }}, use conan: ${{ matrix.use_conan }}, force cpprest asio: ${{ matrix.force_cpprest_asio }}, dns-sd mode: ${{ matrix.dns_sd_mode}}, enable_authorization: ${{ matrix.enable_authorization }})'
1616
runs-on: ${{ matrix.os }}
1717
strategy:
1818
fail-fast: false
@@ -22,8 +22,15 @@ jobs:
2222
use_conan: [true]
2323
force_cpprest_asio: [false]
2424
dns_sd_mode: [multicast, unicast]
25+
enable_authorization: [false, true]
2526
exclude:
2627
# install_mdns is only meaningful on Linux
28+
- os: macos-11
29+
enable_authorization: false
30+
- os: windows-2019
31+
enable_authorization: false
32+
- os: ubuntu-20.04
33+
enable_authorization: false
2734
- os: macos-11
2835
install_mdns: true
2936
- os: windows-2019
@@ -38,34 +45,55 @@ jobs:
3845
- os: ubuntu-20.04
3946
install_mdns: true
4047
dns_sd_mode: unicast
48+
enable_authorization: true
4149
include:
4250
- os: windows-2022
4351
install_mdns: false
4452
use_conan: true
4553
force_cpprest_asio: true
4654
dns_sd_mode: multicast
55+
enable_authorization: true
56+
- os: windows-2022
57+
install_mdns: false
58+
use_conan: true
59+
force_cpprest_asio: true
60+
dns_sd_mode: multicast
61+
enable_authorization: false
4762
- os: ubuntu-22.04
4863
install_mdns: false
4964
use_conan: true
5065
force_cpprest_asio: false
5166
dns_sd_mode: multicast
67+
enable_authorization: true
68+
- os: ubuntu-22.04
69+
install_mdns: false
70+
use_conan: true
71+
force_cpprest_asio: false
72+
dns_sd_mode: multicast
73+
enable_authorization: false
5274

5375
steps:
5476
- uses: actions/checkout@v3
5577

5678
- name: set environment variables
5779
shell: bash
5880
run: |
81+
if [[ "${{ matrix.enable_authorization }}" == "true" ]]; then
82+
authorization_mode=auth
83+
else
84+
authorization_mode=noauth
85+
fi
86+
5987
if [[ "${{ runner.os }}" == "Linux" ]]; then
6088
if [[ "${{ matrix.install_mdns }}" == "true" ]]; then
61-
echo "BUILD_NAME=${{ matrix.os }}_mdns_${{ matrix.dns_sd_mode }}" >> $GITHUB_ENV
89+
echo "BUILD_NAME=${{ matrix.os }}_mdns_${{ matrix.dns_sd_mode }}_$authorization_mode" >> $GITHUB_ENV
6290
else
63-
echo "BUILD_NAME=${{ matrix.os }}_avahi_${{ matrix.dns_sd_mode }}" >> $GITHUB_ENV
91+
echo "BUILD_NAME=${{ matrix.os }}_avahi_${{ matrix.dns_sd_mode }}_$authorization_mode" >> $GITHUB_ENV
6492
fi
6593
elif [[ "${{ matrix.force_cpprest_asio }}" == "true" ]]; then
66-
echo "BUILD_NAME=${{ matrix.os }}_asio" >> $GITHUB_ENV
94+
echo "BUILD_NAME=${{ matrix.os }}_asio_$authorization_mode" >> $GITHUB_ENV
6795
else
68-
echo "BUILD_NAME=${{ matrix.os }}" >> $GITHUB_ENV
96+
echo "BUILD_NAME=${{ matrix.os }}_auth_$authorization_mode" >> $GITHUB_ENV
6997
fi
7098
GITHUB_COMMIT=`echo "${{ github.sha }}" | cut -c1-7`
7199
echo "GITHUB_COMMIT=$GITHUB_COMMIT" >> $GITHUB_ENV
@@ -344,10 +372,23 @@ jobs:
344372
git clone https://github.com/AMWA-TV/nmos-testing.git
345373
cd nmos-testing
346374

347-
# Configure the Testing Tool so all APIs are tested with TLS
348-
printf "from . import Config as CONFIG\nCONFIG.ENABLE_HTTPS = True\n" > nmostesting/UserConfig.py
375+
# Configure the Testing Tool so all APIs are tested with TLS and authorization
376+
printf "from . import Config as CONFIG\nCONFIG.ENABLE_HTTPS = True\nCONFIG.MOCK_SERVICES_WARM_UP_DELAY = 30\nCONFIG.HTTP_TIMEOUT = 2\n" > nmostesting/UserConfig.py
349377
# Set the DNS-SD mode
350378
printf 'CONFIG.DNS_SD_MODE = "'${{ matrix.dns_sd_mode }}'"\n' >> nmostesting/UserConfig.py
379+
# Set the client JWKS_URI for mock Authorization Server to obtain the client JSON Web Key Set (public keys) to verify the client_assertion, when the client is requesting the access token
380+
if [[ "${{ matrix.dns_sd_mode }}" == "multicast" ]]; then
381+
hostname=nmos-api.local
382+
else
383+
hostname=api.testsuite.nmos.tv
384+
fi
385+
printf 'CONFIG.JWKS_URI = "https://'${hostname}':1080/x-authorization/jwks"\n' >> nmostesting/UserConfig.py
386+
387+
if [[ "${{matrix.enable_authorization}}" == "true" ]]; then
388+
printf 'CONFIG.ENABLE_AUTH = True\n' >> nmostesting/UserConfig.py
389+
else
390+
printf 'CONFIG.ENABLE_AUTH = False\n' >> nmostesting/UserConfig.py
391+
fi
351392

352393
# Download testssl
353394
cd testssl
@@ -386,20 +427,21 @@ jobs:
386427
pip install -r utilities/run-test-suites/gsheetsImport/requirements.txt
387428

388429
if [[ "${{ runner.os }}" == "Windows" ]]; then
389-
certutil -enterprise -addstore -user root test_data\\BCP00301\\ca\\certs\\ca.cert.pem
390-
certutil -enterprise -addstore -user ca test_data\\BCP00301\\ca\\intermediate\\certs\\intermediate.cert.pem
391-
certutil -importpfx -enterprise test_data\\BCP00301\\ca\\intermediate\\certs\\ecdsa.api.testsuite.nmos.tv.cert.chain.pfx
392-
certutil -importpfx -enterprise test_data\\BCP00301\\ca\\intermediate\\certs\\rsa.api.testsuite.nmos.tv.cert.chain.pfx
393-
394-
# RSA
395-
netsh http add sslcert ipport=0.0.0.0:1080 certhash=021d50df2177c07095485184206ee2297e50b65c appid="{00000000-0000-0000-0000-000000000000}"
396-
# ECDSA
397-
#netsh http add sslcert ipport=0.0.0.0:1080 certhash=875eca592c49120254b32bb8bed90ac3679015a5 appid="{00000000-0000-0000-0000-000000000000}"
398-
399-
# RSA
400-
netsh http add sslcert ipport=0.0.0.0:8088 certhash=021d50df2177c07095485184206ee2297e50b65c appid="{00000000-0000-0000-0000-000000000000}"
401-
# ECDSA
402-
#netsh http add sslcert ipport=0.0.0.0:8088 certhash=875eca592c49120254b32bb8bed90ac3679015a5 appid="{00000000-0000-0000-0000-000000000000}"
430+
# install certificates
431+
certutil -enterprise -addstore -user root test_data\\BCP00301\\ca\\certs\\ca.cert.pem
432+
certutil -enterprise -addstore -user ca test_data\\BCP00301\\ca\\intermediate\\certs\\intermediate.cert.pem
433+
certutil -importpfx -enterprise test_data\\BCP00301\\ca\\intermediate\\certs\\ecdsa.api.testsuite.nmos.tv.cert.chain.pfx
434+
certutil -importpfx -enterprise test_data\\BCP00301\\ca\\intermediate\\certs\\rsa.api.testsuite.nmos.tv.cert.chain.pfx
435+
436+
# RSA
437+
netsh http add sslcert ipport=0.0.0.0:1080 certhash=021d50df2177c07095485184206ee2297e50b65c appid="{00000000-0000-0000-0000-000000000000}"
438+
# ECDSA
439+
#netsh http add sslcert ipport=0.0.0.0:1080 certhash=875eca592c49120254b32bb8bed90ac3679015a5 appid="{00000000-0000-0000-0000-000000000000}"
440+
441+
# RSA
442+
netsh http add sslcert ipport=0.0.0.0:8088 certhash=021d50df2177c07095485184206ee2297e50b65c appid="{00000000-0000-0000-0000-000000000000}"
443+
# ECDSA
444+
#netsh http add sslcert ipport=0.0.0.0:8088 certhash=875eca592c49120254b32bb8bed90ac3679015a5 appid="{00000000-0000-0000-0000-000000000000}"
403445
fi
404446

405447
if [[ "${{ runner.os }}" == "macOS" ]]; then
@@ -534,7 +576,7 @@ jobs:
534576

535577

536578
build_and_test_ubuntu_14:
537-
name: '${{ matrix.os }}: build and test (install mdns: ${{ matrix.install_mdns }}, use conan: ${{ matrix.use_conan }}, force cpprest asio: ${{ matrix.force_cpprest_asio }}, dns-sd mode: ${{ matrix.dns_sd_mode}})'
579+
name: '${{ matrix.os }}: build and test (install mdns: ${{ matrix.install_mdns }}, use conan: ${{ matrix.use_conan }}, force cpprest asio: ${{ matrix.force_cpprest_asio }}, dns-sd mode: ${{ matrix.dns_sd_mode}}, enable_authorization: ${{ matrix.enable_authorization }})'
538580
runs-on: ubuntu-20.04
539581
container:
540582
image: ubuntu:14.04
@@ -546,6 +588,7 @@ jobs:
546588
use_conan: [false]
547589
force_cpprest_asio: [false]
548590
dns_sd_mode: [multicast]
591+
enable_authorization: [true]
549592

550593
steps:
551594
- uses: actions/checkout@v3
@@ -865,10 +908,23 @@ jobs:
865908
git clone https://github.com/AMWA-TV/nmos-testing.git
866909
cd nmos-testing
867910

868-
# Configure the Testing Tool so all APIs are tested with TLS
869-
printf "from . import Config as CONFIG\nCONFIG.ENABLE_HTTPS = True\n" > nmostesting/UserConfig.py
911+
# Configure the Testing Tool so all APIs are tested with TLS and authorization
912+
printf "from . import Config as CONFIG\nCONFIG.ENABLE_HTTPS = True\nCONFIG.MOCK_SERVICES_WARM_UP_DELAY = 30\nCONFIG.HTTP_TIMEOUT = 2\n" > nmostesting/UserConfig.py
870913
# Set the DNS-SD mode
871914
printf 'CONFIG.DNS_SD_MODE = "'${{ matrix.dns_sd_mode }}'"\n' >> nmostesting/UserConfig.py
915+
# Set the client JWKS_URI for mock Authorization Server to obtain the client JSON Web Key Set (public keys) to verify the client_assertion, when the client is requesting the access token
916+
if [[ "${{ matrix.dns_sd_mode }}" == "multicast" ]]; then
917+
hostname=nmos-api.local
918+
else
919+
hostname=api.testsuite.nmos.tv
920+
fi
921+
printf 'CONFIG.JWKS_URI = "https://'${hostname}':1080/x-authorization/jwks"\n' >> nmostesting/UserConfig.py
922+
923+
if [[ "${{matrix.enable_authorization}}" == "true" ]]; then
924+
printf 'CONFIG.ENABLE_AUTH = True\n' >> nmostesting/UserConfig.py
925+
else
926+
printf 'CONFIG.ENABLE_AUTH = False\n' >> nmostesting/UserConfig.py
927+
fi
872928

873929
# Download testssl
874930
cd testssl
@@ -907,20 +963,21 @@ jobs:
907963
pip install -r utilities/run-test-suites/gsheetsImport/requirements.txt
908964

909965
if [[ "${{ runner.os }}" == "Windows" ]]; then
910-
certutil -enterprise -addstore -user root test_data\\BCP00301\\ca\\certs\\ca.cert.pem
911-
certutil -enterprise -addstore -user ca test_data\\BCP00301\\ca\\intermediate\\certs\\intermediate.cert.pem
912-
certutil -importpfx -enterprise test_data\\BCP00301\\ca\\intermediate\\certs\\ecdsa.api.testsuite.nmos.tv.cert.chain.pfx
913-
certutil -importpfx -enterprise test_data\\BCP00301\\ca\\intermediate\\certs\\rsa.api.testsuite.nmos.tv.cert.chain.pfx
914-
915-
# RSA
916-
netsh http add sslcert ipport=0.0.0.0:1080 certhash=021d50df2177c07095485184206ee2297e50b65c appid="{00000000-0000-0000-0000-000000000000}"
917-
# ECDSA
918-
#netsh http add sslcert ipport=0.0.0.0:1080 certhash=875eca592c49120254b32bb8bed90ac3679015a5 appid="{00000000-0000-0000-0000-000000000000}"
919-
920-
# RSA
921-
netsh http add sslcert ipport=0.0.0.0:8088 certhash=021d50df2177c07095485184206ee2297e50b65c appid="{00000000-0000-0000-0000-000000000000}"
922-
# ECDSA
923-
#netsh http add sslcert ipport=0.0.0.0:8088 certhash=875eca592c49120254b32bb8bed90ac3679015a5 appid="{00000000-0000-0000-0000-000000000000}"
966+
# install certificates
967+
certutil -enterprise -addstore -user root test_data\\BCP00301\\ca\\certs\\ca.cert.pem
968+
certutil -enterprise -addstore -user ca test_data\\BCP00301\\ca\\intermediate\\certs\\intermediate.cert.pem
969+
certutil -importpfx -enterprise test_data\\BCP00301\\ca\\intermediate\\certs\\ecdsa.api.testsuite.nmos.tv.cert.chain.pfx
970+
certutil -importpfx -enterprise test_data\\BCP00301\\ca\\intermediate\\certs\\rsa.api.testsuite.nmos.tv.cert.chain.pfx
971+
972+
# RSA
973+
netsh http add sslcert ipport=0.0.0.0:1080 certhash=021d50df2177c07095485184206ee2297e50b65c appid="{00000000-0000-0000-0000-000000000000}"
974+
# ECDSA
975+
#netsh http add sslcert ipport=0.0.0.0:1080 certhash=875eca592c49120254b32bb8bed90ac3679015a5 appid="{00000000-0000-0000-0000-000000000000}"
976+
977+
# RSA
978+
netsh http add sslcert ipport=0.0.0.0:8088 certhash=021d50df2177c07095485184206ee2297e50b65c appid="{00000000-0000-0000-0000-000000000000}"
979+
# ECDSA
980+
#netsh http add sslcert ipport=0.0.0.0:8088 certhash=875eca592c49120254b32bb8bed90ac3679015a5 appid="{00000000-0000-0000-0000-000000000000}"
924981
fi
925982

926983
if [[ "${{ runner.os }}" == "macOS" ]]; then

Diff for: .github/workflows/src/amwa-test.yml

+30-16
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,24 @@
1919
git clone https://github.com/AMWA-TV/nmos-testing.git
2020
cd nmos-testing
2121

22-
# Configure the Testing Tool so all APIs are tested with TLS
23-
printf "from . import Config as CONFIG\nCONFIG.ENABLE_HTTPS = True\n" > nmostesting/UserConfig.py
22+
# Configure the Testing Tool so all APIs are tested with TLS and authorization
23+
printf "from . import Config as CONFIG\nCONFIG.ENABLE_HTTPS = True\nCONFIG.MOCK_SERVICES_WARM_UP_DELAY = 30\nCONFIG.HTTP_TIMEOUT = 2\n" > nmostesting/UserConfig.py
2424
# Set the DNS-SD mode
2525
printf 'CONFIG.DNS_SD_MODE = "'${{ matrix.dns_sd_mode }}'"\n' >> nmostesting/UserConfig.py
26+
# Set the client JWKS_URI for mock Authorization Server to obtain the client JSON Web Key Set (public keys) to verify the client_assertion, when the client is requesting the access token
27+
if [[ "${{ matrix.dns_sd_mode }}" == "multicast" ]]; then
28+
hostname=nmos-api.local
29+
else
30+
hostname=api.testsuite.nmos.tv
31+
fi
32+
printf 'CONFIG.JWKS_URI = "https://'${hostname}':1080/x-authorization/jwks"\n' >> nmostesting/UserConfig.py
2633

34+
if [[ "${{matrix.enable_authorization}}" == "true" ]]; then
35+
printf 'CONFIG.ENABLE_AUTH = True\n' >> nmostesting/UserConfig.py
36+
else
37+
printf 'CONFIG.ENABLE_AUTH = False\n' >> nmostesting/UserConfig.py
38+
fi
39+
2740
# Download testssl
2841
cd testssl
2942
curl -L https://github.com/drwetter/testssl.sh/archive/v3.0.7.tar.gz -s | tar -xvzf - --strip-components=1 > /dev/null
@@ -61,20 +74,21 @@
6174
pip install -r utilities/run-test-suites/gsheetsImport/requirements.txt
6275

6376
if [[ "${{ runner.os }}" == "Windows" ]]; then
64-
certutil -enterprise -addstore -user root test_data\\BCP00301\\ca\\certs\\ca.cert.pem
65-
certutil -enterprise -addstore -user ca test_data\\BCP00301\\ca\\intermediate\\certs\\intermediate.cert.pem
66-
certutil -importpfx -enterprise test_data\\BCP00301\\ca\\intermediate\\certs\\ecdsa.api.testsuite.nmos.tv.cert.chain.pfx
67-
certutil -importpfx -enterprise test_data\\BCP00301\\ca\\intermediate\\certs\\rsa.api.testsuite.nmos.tv.cert.chain.pfx
68-
69-
# RSA
70-
netsh http add sslcert ipport=0.0.0.0:1080 certhash=021d50df2177c07095485184206ee2297e50b65c appid="{00000000-0000-0000-0000-000000000000}"
71-
# ECDSA
72-
#netsh http add sslcert ipport=0.0.0.0:1080 certhash=875eca592c49120254b32bb8bed90ac3679015a5 appid="{00000000-0000-0000-0000-000000000000}"
73-
74-
# RSA
75-
netsh http add sslcert ipport=0.0.0.0:8088 certhash=021d50df2177c07095485184206ee2297e50b65c appid="{00000000-0000-0000-0000-000000000000}"
76-
# ECDSA
77-
#netsh http add sslcert ipport=0.0.0.0:8088 certhash=875eca592c49120254b32bb8bed90ac3679015a5 appid="{00000000-0000-0000-0000-000000000000}"
77+
# install certificates
78+
certutil -enterprise -addstore -user root test_data\\BCP00301\\ca\\certs\\ca.cert.pem
79+
certutil -enterprise -addstore -user ca test_data\\BCP00301\\ca\\intermediate\\certs\\intermediate.cert.pem
80+
certutil -importpfx -enterprise test_data\\BCP00301\\ca\\intermediate\\certs\\ecdsa.api.testsuite.nmos.tv.cert.chain.pfx
81+
certutil -importpfx -enterprise test_data\\BCP00301\\ca\\intermediate\\certs\\rsa.api.testsuite.nmos.tv.cert.chain.pfx
82+
83+
# RSA
84+
netsh http add sslcert ipport=0.0.0.0:1080 certhash=021d50df2177c07095485184206ee2297e50b65c appid="{00000000-0000-0000-0000-000000000000}"
85+
# ECDSA
86+
#netsh http add sslcert ipport=0.0.0.0:1080 certhash=875eca592c49120254b32bb8bed90ac3679015a5 appid="{00000000-0000-0000-0000-000000000000}"
87+
88+
# RSA
89+
netsh http add sslcert ipport=0.0.0.0:8088 certhash=021d50df2177c07095485184206ee2297e50b65c appid="{00000000-0000-0000-0000-000000000000}"
90+
# ECDSA
91+
#netsh http add sslcert ipport=0.0.0.0:8088 certhash=875eca592c49120254b32bb8bed90ac3679015a5 appid="{00000000-0000-0000-0000-000000000000}"
7892
fi
7993

8094
if [[ "${{ runner.os }}" == "macOS" ]]; then

0 commit comments

Comments
 (0)