-
Notifications
You must be signed in to change notification settings - Fork 0
feat: implement auth middleware with tenant manager #89
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
Draft
onselakin
wants to merge
26
commits into
main
Choose a base branch
from
onsel/ess-2-integrate-eso-server-with-existing-authz-on-tenant-manager
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
feat: implement auth middleware with tenant manager #89
onselakin
wants to merge
26
commits into
main
from
onsel/ess-2-integrate-eso-server-with-existing-authz-on-tenant-manager
Conversation
This file contains hidden or 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
…nt manager integration
ESS-2 Integrate ESO server with existing AuthZ on tenant-manager
In order for us to safely use ESO server, we need to be able to:
Both of these activities need t obe checked by middleware-integrating ESO server with tenant-manager |
- Merged authorization implementation from HEAD with new features from main - Added proper import aliases to avoid middleware naming conflicts - Integrated tenant manager authentication with all new handlers - Applied authorization middleware to all routes including: - Generator routes with CRUD operations - Scan job routes with CRUD operations - Scan finding routes with read operations - Target routes with CRUD operations - Generator state routes with read/delete operations - Maintained permissions routes for tenant management - Added new content route for secrets with authorization - Unified function signature to include all handlers from both branches
…with-existing-authz-on-tenant-manager
…ng-authz-on-tenant-manager # Conflicts: # Tiltfile # database/database.go # deploy/local/eso-server.yaml # go.mod # go.sum
…ng-authz-on-tenant-manager
…ng-authz-on-tenant-manager
…ng-authz-on-tenant-manager # Conflicts: # main.go
…ng-authz-on-tenant-manager
…ng-authz-on-tenant-manager
…with-existing-authz-on-tenant-manager
…icy service with metadata context
…t for service registration in Helm chart and middleware
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.
This pull request introduces middleware components for authentication, authorization, service registration, and token management in the ESO-server project. These changes enhance the security and integration capabilities of the server with the tenant manager. The most important changes include the implementation of authentication and authorization middleware, service registration logic, token management functionality, and the integration of these components into the main application.
Middleware for Authentication and Authorization:
handlers/middleware/auth.go: AddedAuthMiddlewareto handle authentication and authorization, including JWT validation and tenant manager authorization checks. This includes methods likeValidateToken,CheckAuthorization, andcallTenantManagerAuthz.Service Registration:
handlers/middleware/service_registration.go: ImplementedServiceRegistrationfor ESO-server's self-registration with the tenant manager, including creating policies for authorization. Methods likeRegisterWithTenantManagerandSetupPoliciesensure the server registers itself and sets up necessary permissions.Token Management:
handlers/middleware/token_manager.go: AddedTokenManagerto manage OAuth token exchange and refresh. This includes methods to ensure valid tokens (EnsureValidToken) and handle token exchange (exchangeToken).Integration into Main Application:
main.go: Integrated the middleware package into the main application by adding it to the import statements.…nt manager integration