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

Support for OAuth authentication for connecting to Subscribed Catalogues, and federation fixes #388

Merged
merged 24 commits into from
Jan 24, 2023

Conversation

joe-crawford
Copy link
Contributor

@joe-crawford joe-crawford commented Jan 20, 2023

Support for OAuth authentication for Subscribed Catalogue connections (resolves mc-9890):

  • A subscribedCatalogueAuthenticationType must be supplied as well as a subscribedCatalogueType. Supported authentication types are No Authentication, API Key, and OAuth (Client Credentials/Server-to-Server).
  • Update controller and services to allow multiple authentication types and add migration script.

Support for federating VersionedFolders and importer changes:

  • Allow VersionedFolder importers to be used in federation.
  • Allow passing an authority to importers to be used if saving imported domains.
  • Add optional canFederate method to ImporterProviderService - defaults to true, if false the importer cannot be used in federation.
  • VersionedFolderService versioning methods updates and fixes.

Atom feed changes:

  • Support federating version links from Atom subscribed catalogues by looking at like labels with different lastUpdated times.
  • Add model versions to contentItemVersion extension to published Atom feed, update XSDs.

Published models changes:

  • Use modelVersionTag field to hold contentItemVersion from Atom feed catalogues.

Update tests:

  • Replace (disabled) admin API key with read-only API key in tests using Continuous Deployment instance.

…enticationCredentials

- Also update FederationClients to support authentication
…n, SubscribedCatalogue updates

- Add ImporterProviderService canFederate flag
- Add credentials fields to subscribedCatalogue_full view
- When federating models, import as new finalised branch versions of existing models
- Add method to finalise VersionedFolder as new branch version of existing VersionedFolder
@joe-crawford
Copy link
Contributor Author

joe-crawford commented Jan 23, 2023

Failing test looks unrelated.

Example requests are in the Federation - PR 388 folder in the Postman collection.

Copy link
Contributor

@jamesrwelch jamesrwelch left a comment

Choose a reason for hiding this comment

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

This is an epic piece of work - thank you! You demoed the functionality and talked me through the code changes. The tests pass and I can't see any obvious issues with the code itself, so I think this is good to go. Nice one!

@jamesrwelch jamesrwelch merged commit f2c7dbb into develop Jan 24, 2023
@jamesrwelch jamesrwelch deleted the feature/mc-9890 branch January 24, 2023 14:03
@joe-crawford
Copy link
Contributor Author

Great, thank you!

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.

None yet

2 participants