Conversation
e129ca4 to
304960a
Compare
This commit adds a feature guard around the new_unchecked fn in the rbac assignment store. Signed-off-by: Caleb Hill <hill@bitwise.io>
OAuth integration tests make heavy use of the OAuthClient struct as you might expect. Those integration tests are moving to the rest_api crates because they also use actix-web specific code. This presents a problem in that there wasn't a way to construct a client outside of libsplinter. This commit makes the OAuthClient constructor public so it can be used in the actix_web_1 crate. Signed-off-by: Caleb Hill <hill@bitwise.io>
This commit adds a constructor and a getter used by some tests in the splinter_rest_api_actix_web_1 crate. Signed-off-by: Caleb Hill <hill@bitwise.io>
This commit adds the log,rand, and jsonwebtoken dependencies to common. Those crates are used by code moving into this crate. Signed-off-by: Caleb Hill <hill@bitwise.io>
304960a to
b48d2ae
Compare
This commit moves all actix-web and supporting rest-api code into the
actix-web-1 and common crates.
The main discriminant is 'does this have actix-web-1 stuff in it' =>
actix-web-1 else common.
Below is an accounting of where things moved from
libsplinter/src/rest_api. This commit encompasses these moves as well as
updating everything in the rest_api and splinterd crates to import
structs from the right places.
1 auth
======
1.1 identity => rest_api/common/auth/identity
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1.1.1 biome.rs
--------------
1.1.2 cylinder.rs
-----------------
1.1.3 mod.rs
------------
1.1.4 oauth.rs
--------------
1.2 mod.rs => rest_api/common/auth/{authorization_result, authorization_header, bearer_token}.mod.rs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1.3 actix.rs => rest_api/actix_web_1/auth/{transform,middleware}.rs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1.4 authorization
~~~~~~~~~~~~~~~~~
1.4.1 permission_map.rs => Split between common/auth/permission_map.rs and actix_web_1/auth/method.rs
------------------------------------------------------------------------------------------------------
1.4.2 rbac
----------
* 1.4.2.1 handler.rs => common/auth/rbac/handler.rs
* 1.4.2.2 mod.rs
* 1.4.2.3 rest_api
+ 1.4.2.3.1 resources => common/auth/rbac/resources
- 1.4.2.3.1.1 roles.rs
- 1.4.2.3.1.2 mod.rs
- 1.4.2.3.1.3 assignments.rs
+ 1.4.2.3.2 mod.rs => delete
+ 1.4.2.3.3 actix_web_1 => actix_web_1/auth/rbac
- 1.4.2.3.3.1 error.rs => common/auth/rbac/error.rs
- 1.4.2.3.3.2 roles.rs
- 1.4.2.3.3.3 mod.rs
- 1.4.2.3.3.4 assignments.rs
1.4.3 mod.rs => common/auth/{permission,authorization_handler_result,authorization_handler}.rs
----------------------------------------------------------------------------------------------
* 1.4.3.1 Split
* 1.4.3.2 Move
1.4.4 maintenance
-----------------
* 1.4.4.1 mod.rs => split common/auth/maintenance/{maintenance_mode_authorization_handler,mod}.rs
+ 1.4.4.1.1 Split
+ 1.4.4.1.2 Move
* 1.4.4.2 routes
+ 1.4.4.2.1 actix.rs => actix-web-1/auth/maintenance/routes.rs
+ 1.4.4.2.2 mod.rs => actix-web-1/auth/maintenance/mod.rs
+ 1.4.4.2.3 resources.rs => common/auth/maintenance/
1.4.5 allow_keys.rs => common/auth/allow_keys.rs
------------------------------------------------
1.4.6 routes
------------
* 1.4.6.1 mod.rs => actix-web/actix-web-1/routes/resource_provider.rs
* 1.4.6.2 actix.rs => actix-web/actix-web/routes/make_permissions_resource.rs
* 1.4.6.3 resources.rs => common/auth/routes?/resources.rs
2 secrets => common/auth/secrets
================================
2.1 error.rs
~~~~~~~~~~~~
2.2 mod.rs
~~~~~~~~~~
2.3 auto_secret_manager.rs
~~~~~~~~~~~~~~~~~~~~~~~~~~
3 cors.rs => actix-web-1/auth/cors.rs
=====================================
4 response_models.rs => common/response_models.rs
=================================================
5 paging.rs => delete, already exists in common
===============================================
6 mod.rs => Split common/{OauthConfig,bind_config,mod}.rs
=========================================================
7 sessions => common/sessions/
==============================
7.1 claims.rs
~~~~~~~~~~~~~
7.2 token_issuer.rs
~~~~~~~~~~~~~~~~~~~
7.3 error.rs
~~~~~~~~~~~~
7.4 mod.rs
~~~~~~~~~~
8 errors.rs => common/auth/error.rs
===================================
Signed-off-by: Caleb Hill <hill@bitwise.io>
b48d2ae to
052c717
Compare
vaporos
approved these changes
Feb 12, 2024
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
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.
No description provided.