Skip to content

Conversation

@seantleonard
Copy link
Contributor

@seantleonard seantleonard commented Oct 14, 2024

Why make this change?

  • Closes Hot-Reload Authorization rules #2324 which tracks making DAB's AuthorizationResolver hot-reload aware. Hot-reload aware just means that the service should update its internal state to align with the latest runtimeconfig changes.

What is this change?

  • Adds Event for DAB's HotReload event handler to signal changes to the runtime config. The AuthorizationResolver can only refresh once the SqlMetadataProvider has fetched updated database object metadata.
  • GraphQL is not yet supported (separate work item for schema eviction).
  • REST should work when Add Support for Hot Reload of DataSource Section of Config file. #2417 is merged which fixes bug with updating metadata providers after hot reload.

How was this tested?

  • Integration Tests -> setup test fixture with initial config specifying a Book entity with certain permissions. The test then hot-reloads a new config with a different entity and different permissions (different include/exclude column names) and validates that only the new entity is accessible and the expected fields are accessible. Validates that the old entity is not accessible and has "been forgotten" by DAB.

@seantleonard
Copy link
Contributor Author

/azp run

Copy link
Collaborator

@Aniruddh25 Aniruddh25 left a comment

Choose a reason for hiding this comment

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

Looks good, specially the TestFixture. Left a few questions. Thanks for pushing out these changes so quickly.

@seantleonard seantleonard added this to the 1.3 milestone Oct 30, 2024
Copy link
Contributor

@abhishekkumams abhishekkumams left a comment

Choose a reason for hiding this comment

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

LGTM

@abhishekkumams
Copy link
Contributor

/azp run

@abhishekkumams
Copy link
Contributor

/azp run

no change in pipeline. previous change was done to test pipelines behaviour.
@abhishekkumams
Copy link
Contributor

/azp run

@abhishekkumams
Copy link
Contributor

/azp run

@seantleonard
Copy link
Contributor Author

/azp run

@seantleonard seantleonard enabled auto-merge (squash) October 30, 2024 22:17
@seantleonard seantleonard merged commit 4f22ca8 into main Oct 31, 2024
1 check passed
@seantleonard seantleonard deleted the dev/sean/authZresolverHR branch October 31, 2024 00:02
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.

Hot-Reload Authorization rules

4 participants