Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Document clearly the available Authentication Strategies #578

Merged
merged 7 commits into from
Sep 20, 2023

Conversation

lukehesluke
Copy link
Contributor

Closes #577

Comment on lines -14 to +16
Running `npm start` will orchestrate running the [OpenID Test Client](./packages/openactive-openid-test-client/), [Broker Microservice](./packages/openactive-broker-microservice/) and the [Integration Tests](./packages/openactive-integration-tests/) in order to test your Open Booking API implementation.
Running `npm start` will orchestrate running the [Broker Microservice](./packages/openactive-broker-microservice/) and the [Integration Tests](./packages/openactive-integration-tests/) in order to test your Open Booking API implementation.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Test Client is not "run" by npm start. It's just used as a library dependency

@@ -39,6 +41,121 @@ The test suite uses the file `config/{NODE_ENV}.json` to override the settings i

For more information see this [documentation](https://github.com/lorenwest/node-config/wiki/Environment-Variables#node_env).

### Configuration for `sellers` within `./config/{NODE_ENV}`
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is nearly identical to the section that was in Integration Tests' README with some additional input from the section that was in Broker Microservice's READE (there was some duplicated docs there)

I've moved it here to reflect the fact that sellers' config is not in either the broker nor integrationTests part of the config file

},
```

#### Client Credentials
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This section was taken from Broker

},
```

This is different from the behaviour in the Client Credentials sub-section mentioned within the [OpenID Connect Booking Partner Authentication for Multiple Seller Systems](https://openactive.io/open-booking-api/EditorsDraft/#openid-connect-booking-partner-authentication-for-multiple-seller-systems) section in the spec as, in this case, Client Credentials are used to make booking requests for this Seller, rather than just to view the Booking Partner's Orders Feed.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added this part. Before, the docs for this were misleadingly linking to the spec's bit on Client Credentials, which is incorrect as that is for Orders Feed Authentication only

"description": "For multi-database booking systems where the customer manages Open Booking API client credentials.",
"explainer": "",
"description": "Implements OpenID Connect Dynamic Client Registration. For multi-database booking systems where the customer manages Open Booking API client credentials.",
"explainer": "The Booking System must implement OpenID Connect Dynamic Client Registration, which requires an Initial Access Token",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It looks like Initial Access Token is just one way of using Dynamic Client Registration. So I wanted to make it clear that that is all that is supported at present

@lukehesluke lukehesluke marked this pull request as ready for review September 15, 2023 12:54

# Concepts

## Booking Partner Authentication Strategy
Copy link
Contributor Author

Choose a reason for hiding this comment

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

README.md Outdated
* `authentication`: Check out the [**Configuration for Seller Authentication**](#configuration-for-seller-authentication) section.
* `taxMode`: Which [Tax Mode](https://openactive.io/open-booking-api/EditorsDraft/1.0CR3/#tax-mode) is used for this Seller.

**Note: If testing both Tax Modes, make sure that there is at least one Seller with each**. Alternatively, if not supporting multiple Sellers, you can run the Test Suite once with `"taxMode": "https://openactive.io/TaxNet"` and once with `"taxMode": "https://openactive.io/TaxGross"`.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Great suggestion to run it twice - though how would this work with the certificate? Is it worth us clarifying that currently it's not possible to generate a certificate that covers both configurations unless multiple Sellers are supported?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was moved over from existing documentation, but I'll add something to that effect

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

README.md Outdated Show resolved Hide resolved

### Booking Authentication

How a Booking Partner accesses the booking endpoints (C1, C2, B, etc) for a specific Seller's data. This differs from [Orders Feed Authentication](#orders-feed-authentication) as it can be specified at the per-Seller level for Multiple Seller Systems (relevant feature: [`multiple-sellers`](packages/openactive-integration-tests/test/features/core/multiple-sellers/)).
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
How a Booking Partner accesses the booking endpoints (C1, C2, B, etc) for a specific Seller's data. This differs from [Orders Feed Authentication](#orders-feed-authentication) as it can be specified at the per-Seller level for Multiple Seller Systems (relevant feature: [`multiple-sellers`](packages/openactive-integration-tests/test/features/core/multiple-sellers/)).
Authentication of the Booking Partner authorises them access to the booking endpoints (C1, C2, B, etc) for a specific Seller's data. This differs from [Orders Feed Authentication](#orders-feed-authentication) as it can be specified at the per-Seller level for Multiple Seller Systems (relevant feature: [`multiple-sellers`](packages/openactive-integration-tests/test/features/core/multiple-sellers/)).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I appreciate where you're going with this. I'll leave it as is for now as I think it reads more easily

@lukehesluke lukehesluke merged commit 5a292cc into master Sep 20, 2023
32 checks passed
@lukehesluke lukehesluke deleted the feature/authentication-strategies-docs branch September 20, 2023 11:07
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.

Cleanup and signpost Authentication Strategies in Test Suite's docs
2 participants