Skip to content

IS-10 Auth Tests: check missing public key and replaced Auth server with mock - #599

Merged
garethsb merged 38 commits into
AMWA-TV:masterfrom
lo-simon:check-missing-public-key
Feb 24, 2023
Merged

garethsb merged 38 commits into
AMWA-TV:masterfrom
lo-simon:check-missing-public-key

Conversation

@lo-simon

@lo-simon lo-simon commented Mar 2, 2021

Copy link
Copy Markdown
Contributor

Add authorization test for checking Node and Registry behavior while receiving missing public key token.

Comment thread nmostesting/mocks/Auth.py Resolved
Comment thread nmostesting/GenericTest.py Resolved
prince-chrismc
prince-chrismc previously approved these changes Jun 11, 2021

@andrewbonney andrewbonney left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for not getting to this sooner. The changes look good generally. I think the main thing that's missing is some documentation - particularly around how to configure things so that the mock authorization server can be chosen (and advertised by the DNS server) when there isn't one available locally.

Also as noted inline, if the mock auth server is more generally useful for the other auth tests then its activation should maybe be handled earlier. The new public key test may then need disabling in the case where a user chooses to use their own external auth server as the testing tool would have no control over rotating the public keys.

Comment thread nmostesting/mocks/Auth.py Resolved
Comment thread nmostesting/GenericTest.py Resolved
Comment thread nmostesting/GenericTest.py Resolved
Comment thread nmostesting/GenericTest.py Resolved
@jonathan-r-thorpe jonathan-r-thorpe changed the title add authorization test for checking missing public key IS-10 Test Suite: check missing public key and replaced Auth server with mock Jan 30, 2023
@jonathan-r-thorpe jonathan-r-thorpe changed the title IS-10 Test Suite: check missing public key and replaced Auth server with mock IS-10 Auth Tests: check missing public key and replaced Auth server with mock Jan 30, 2023
@garethsb

garethsb commented Jan 30, 2023 •

Copy link
Copy Markdown
Contributor

@lo-simon Does this PR need rebasing? It's currently showing 100 changed files over 185 commits...

@garethsb
garethsb force-pushed the check-missing-public-key branch from f7496f3 to 8832f99 Compare January 31, 2023 13:42
@garethsb

Copy link
Copy Markdown
Contributor

@lo-simon I rebased again without the old merge commit and that seems to have made GitHub happier I hope!!

Comment thread nmostesting/NMOSTesting.py Resolved
Comment thread nmostesting/GenericTest.py Resolved
Comment thread nmostesting/GenericTest.py Resolved

@garethsb garethsb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Next review comments

Comment thread nmostesting/GenericTest.py Resolved
Comment thread nmostesting/GenericTest.py Resolved
Comment thread nmostesting/GenericTest.py Resolved
Comment thread nmostesting/GenericTest.py Resolved
Comment thread nmostesting/GenericTest.py Resolved
Comment thread nmostesting/GenericTest.py Resolved
Comment thread nmostesting/GenericTest.py Resolved
Comment thread nmostesting/GenericTest.py Resolved
Comment thread nmostesting/TestHelper.py Resolved
Comment thread nmostesting/mocks/Auth.py Resolved
lo-simon and others added 6 commits February 2, 2023 11:31
Co-authored-by: Gareth Sylvester-Bradley <31761158+garethsb@users.noreply.github.com>
Co-authored-by: Gareth Sylvester-Bradley <31761158+garethsb@users.noreply.github.com>
Co-authored-by: Gareth Sylvester-Bradley <31761158+garethsb@users.noreply.github.com>
Co-authored-by: Gareth Sylvester-Bradley <31761158+garethsb@users.noreply.github.com>
Comment thread nmostesting/suites/IS0401Test.py Resolved
Comment thread nmostesting/suites/IS0402Test.py Resolved
Comment thread nmostesting/mocks/Auth.py Resolved
Comment thread nmostesting/Config.py Resolved
Comment thread nmostesting/Config.py Resolved
Comment thread nmostesting/Config.py Resolved
Comment thread nmostesting/IS10Utils.py Resolved
Comment thread nmostesting/NMOSTesting.py Resolved
Comment thread nmostesting/mocks/Auth.py Resolved
Comment thread nmostesting/mocks/Auth.py Resolved
Comment thread nmostesting/mocks/Auth.py Resolved
Comment thread nmostesting/suites/IS0401Test.py Resolved
Comment thread nmostesting/suites/IS0402Test.py Resolved
Comment thread nmostesting/mocks/Auth.py Resolved
Comment thread nmostesting/IS10Utils.py Resolved
Comment thread nmostesting/mocks/Auth.py Resolved
Comment thread nmostesting/GenericTest.py Resolved

@garethsb garethsb left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe not in this PR, but it would be nice if the code duplication with NMOSTesting.py were resolved at some point... Now added as #763.

Comment thread nmostesting/mocks/Auth.py Resolved
Comment thread nmostesting/mocks/Auth.py Resolved
Comment thread nmostesting/mocks/Auth.py Resolved

@garethsb garethsb left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lo-simon I think it's as simple as these suggestions to change the mock Auth endpoints to non-standard ones, right?

We might also want to consider a test case involving an issuer with a URL path component, e.g. https://mocks.testsuite.nmos.tv:{port}/testpath, so that we check that they go to the right well-known URL, i.e. https://mocks.testsuite.nmos.tv:{port}/.well-known/oauth-authorization-server/testpath ? Now added as #762.

Comment thread nmostesting/mocks/Auth.py Resolved
Comment thread nmostesting/mocks/Auth.py Resolved
Comment thread nmostesting/mocks/Auth.py Resolved
Comment thread nmostesting/mocks/Auth.py Resolved
Comment thread nmostesting/mocks/Auth.py Resolved
garethsb
garethsb previously approved these changes Feb 23, 2023

@garethsb garethsb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@garethsb
garethsb force-pushed the check-missing-public-key branch from 76c5f79 to 4e232d3 Compare February 24, 2023 11:13

@garethsb garethsb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We remember docs needed updating. Now done. Ready to merge!

@garethsb
garethsb merged commit bf723e8 into AMWA-TV:master Feb 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants