-
Notifications
You must be signed in to change notification settings - Fork 1
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
[IDP-873] Generate Openapi Description of Security Requirements #80
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…with_custom_permissions' into feature/idp-1027_support_policy_with_custom_permissions # Conflicts: # src/Workleap.AspNetCore.Authentication.ClientCredentialsGrant/RequireClientCredentialsRequirementHandler.cs
…RequireClientCredentialsAttribute.cs Co-authored-by: Anthony Simmon <[email protected]>
…permissions' into feature/idp-873_generate_openapi_description
Need to update documentation! |
PrincessMadMath
commented
Jun 21, 2024
...kleap.Authentication.ClientCredentialsGrant.Tests/OpenAPI/OpenApiSecurityDescriptionTests.cs
Outdated
Show resolved
Hide resolved
PrincessMadMath
commented
Jun 21, 2024
...Workleap.AspNetCore.Authentication.ClientCredentialsGrant/AuthenticationBuilderExtensions.cs
Outdated
Show resolved
Hide resolved
PrincessMadMath
commented
Jun 21, 2024
src/Workleap.AspNetCore.Authentication.ClientCredentialsGrant/ClientCredentialsDefaults.cs
Outdated
Show resolved
Hide resolved
PrincessMadMath
commented
Jun 21, 2024
...Workleap.AspNetCore.Authentication.ClientCredentialsGrant/AuthenticationBuilderExtensions.cs
Outdated
Show resolved
Hide resolved
...AspNetCore.Authentication.ClientCredentialsGrant/OpenAPI/SecurityDefinitionDocumentFilter.cs
Outdated
Show resolved
Hide resolved
src/tests/WebApi.OpenAPI.SystemTest/Properties/launchSettings.json
Outdated
Show resolved
Hide resolved
src/Workleap.AspNetCore.Authentication.ClientCredentialsGrant/OpenAPI/SwaggerUtils.cs
Outdated
Show resolved
Hide resolved
src/Workleap.AspNetCore.Authentication.ClientCredentialsGrant/OpenAPI/SwaggerUtils.cs
Outdated
Show resolved
Hide resolved
heqianwang
approved these changes
Jun 21, 2024
...tion.ClientCredentialsGrant/Workleap.AspNetCore.Authentication.ClientCredentialsGrant.csproj
Outdated
Show resolved
Hide resolved
...pNetCore.Authentication.ClientCredentialsGrant/OpenAPI/SecurityRequirementOperationFilter.cs
Outdated
Show resolved
Hide resolved
...pNetCore.Authentication.ClientCredentialsGrant/OpenAPI/SecurityRequirementOperationFilter.cs
Show resolved
Hide resolved
...pNetCore.Authentication.ClientCredentialsGrant/OpenAPI/SecurityRequirementOperationFilter.cs
Outdated
Show resolved
Hide resolved
PrincessMadMath
commented
Jun 25, 2024
...kleap.Authentication.ClientCredentialsGrant.Tests/OpenAPI/OpenApiSecurityDescriptionTests.cs
Outdated
Show resolved
Hide resolved
PrincessMadMath
commented
Jun 25, 2024
...AspNetCore.Authentication.ClientCredentialsGrant/OpenAPI/SecurityDefinitionDocumentFilter.cs
Outdated
Show resolved
Hide resolved
…description # Conflicts: # src/Workleap.Authentication.ClientCredentialsGrant.Tests/Workleap.Authentication.ClientCredentialsGrant.Tests.csproj
Gcaya
reviewed
Jul 3, 2024
Gcaya
reviewed
Jul 3, 2024
...Workleap.AspNetCore.Authentication.ClientCredentialsGrant/AuthenticationBuilderExtensions.cs
Show resolved
Hide resolved
Gcaya
reviewed
Jul 3, 2024
src/Workleap.AspNetCore.Authentication.ClientCredentialsGrant/OpenAPI/SwaggerUtils.cs
Show resolved
Hide resolved
heqianwang
approved these changes
Jul 3, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of changes
Add Swagger Filter to be able to generate security requirements for an OpenAPI Document:
Breaking changes
Remove support of the attribute at class level: was dangerous since it was unclear what would be the expected behavior.
In ASP.NET you should & the Authorization Policy, but our ClientCredentialRequirement is doing a | between the roles: so concatenating the class and method attributes would make an endpoint more accessible. Here to access the
ChangePrice
endpoint what role the users need (cocktail.read | cocktail.admin
,cocktail.admin
,cocktail.read & cocktail.admin
).For simplicity and since current usage seems to be at the controller level we remove class support for now.
Additional checks