Commit Graph

2445 Commits (9dee9b0409de1357da5bfa0b185a1469d032975f)

Author SHA1 Message Date
John Niang 61d2169a51
Add additional method to fetch Extension by GVK and name (#2190) 2022-06-26 16:04:09 +00:00
guqing c0758f32d1
refactor: plugin configuration loading to adapt to plugin development mode (#2183)
* refactor: plugin configuration loading to adapt to plugin development mode

* refactor: extension locations

* refactor: plugin labels

* fix: unit test
2022-06-23 09:56:26 +00:00
guqing 273ffaad48
feat: add plugin status manage (#2177)
* feat: add plugin status manage

* feat: add plugin state changed listener

* refactor: plugin status

* refactor: plugin
2022-06-23 03:08:24 +00:00
John Niang c24df6fb05
Refine Swagger document for Extension APIs (#2180) 2022-06-22 04:36:21 +00:00
John Niang ac7a3c86c8
Configure CORS for API endpoints (#2175) 2022-06-21 11:06:20 +00:00
John Niang d556787b3a
Add update and delete handlers for Extensions (#2172) 2022-06-21 11:04:21 +00:00
guqing b9e5ed2f4c
feat: add shared application context for plugin (#2174)
* feat: add shared application context for plugin

* chore: remove todo notes

* fix: router function composite
2022-06-21 07:34:25 +00:00
guqing 7cd1282ad3
feat: add request mapping handler mapping for plugin (#2161)
* feat: add requet mapping handler mapping for plugin

* fix: request info resolve

* fix: test code style

* refactor: plugin api version resolve

* fix: merge conflicts
2022-06-21 03:22:24 +00:00
guqing 89eeccd99c
fix: locale for unit test of json extension converter (#2170) 2022-06-20 15:18:28 +00:00
John Niang f5d629d2bf
Add user support for authentication and authorization (#2163)
* Move role and rolebinding extensions into core package

* Add UserExtensionUserDetailService to find user and update password

* Rename DefaultUserDetailService

* Fix test errors

* Add SuperAdminInitializer to initialize first user

* Add unit tests for DefaultUserDetailService and UserService

* Add test for verifying SuperAdminInitializer

* Fix unstable test due to database reusability

Signed-off-by: johnniang <johnniang@fastmail.com>
2022-06-20 03:26:18 +00:00
John Niang e52db6859f
Add feature to generate APIs for schemes automatically (#2158)
* Add ExtensionEndpointInstaller

* Refactor Schemes with SchemeManager

* Add some unit tests

1. Add ExtensionCompositeRouterFunctionTest
2. Add ExtensionConfigurationTest
3. Refactor Unstructured
4. Fix bad ObjectMapper in Json converter.

* Fix bad scheme registration
2022-06-16 03:10:14 +00:00
guqing fcbf0031a4
feat: plugin supports multiple ways of specifying licenses (#2152)
* feat: plugin supports multiple ways of specifying licenses

* feat: add unit test case for deserialize license
2022-06-15 15:36:12 +00:00
guqing 83d668b0a9
feat: add plugin unstructured resource loader (#2154)
* feat: add plugin unstructured resource loader

* feat: add test unit case
2022-06-14 15:38:12 +00:00
guqing 6bbaa9aeba
feat: add reverse proxy router registry for plugin by reverse proxy rules (#2151)
* feat: add reverse proxy router registry for plugin by reverse proxy rules

* Update src/main/java/run/halo/app/plugin/resources/ReverseProxyRouterFunctionFactory.java

Co-authored-by: John Niang <johnniang@fastmail.com>

* refactor: merge stream operation

* refactor: plugin composite router function

* feat: add unit test case

Co-authored-by: John Niang <johnniang@fastmail.com>
2022-06-14 10:58:21 +00:00
guqing a2f49c60bc
feat: add plugin life cycle management (#2134)
* feat: add plugin life cycle management

* refactor: plugin lifecycle endpoint mapping
2022-06-13 02:36:11 +00:00
Halo Dev Bot 95c6caaca1
docs: add CODE_OF_CONDUCT.md (#2150)
Co-authored-by: Ryan Wang <i@ryanc.cc>
2022-06-12 08:10:12 +00:00
John Niang a956758a2f
Overwrite Jackson2Json decoder and encoder (#2145) 2022-06-09 08:04:13 +00:00
John Niang 02a7143fe5
Enable CSRF token in Set-Cookie header (#2144) 2022-06-09 02:30:13 +00:00
guqing b3b13bc820
feat: add yaml descriptor finder for plugin (#2132)
* feat: add yaml plugin descriptor finder

* refactor: json assert

* refactor: plugin descriptor finder

* refactor: yaml plguin finder

* refactor: plugin dependencies
2022-06-07 06:32:12 +00:00
John Niang 1024f71635
Replace webmvc with webflux (#2138)
* Replace webmvc to webflux

Signed-off-by: johnniang <johnniang@fastmail.com>

* Remove jetty dependency

Signed-off-by: johnniang <johnniang@fastmail.com>

* Refactor authentication module

* Refactor authentication module

* Migrate authorization module

* Refactor Login components

* Fix broken imports

* Upgrade springdoc version

* Refine security matcher using pathMatchers utility
2022-06-07 02:20:12 +00:00
guqing 19db04c430
refactor: policy rule constructor to avoid null values (#2131)
* refactor: policy rule constructor to avoid null values

* fix: unit test case
2022-06-02 02:52:10 +00:00
guqing 2c057f4fe1
feat: add plugin implementation (#2128) 2022-05-31 04:06:10 +00:00
guqing f4a943e45a
refactor: rule resolver and role binding lister (#2119) 2022-05-30 09:08:09 +00:00
guqing 9a05942bc4
feat: add yaml unstructured loader (#2122) 2022-05-28 09:44:08 +00:00
guqing 3c856d04af
feat: add personal access token authentication mechanism (#2116)
* feat: add personal access token authentication

* fix: merge conflicts

* refactor: remove base62 codec

* refactor: remove deprecated method

* feat: add base64 test

* chore: add todo for test only methods
2022-05-27 06:26:37 +00:00
John Niang b5d7f194ef
Create unstructured Extension which can store any Extensions (#2111)
* Extract ExtensionOperator and MetadataOperator

* Move groupVersionKind methods up to ExtensionOperator interface

* Add Unstructured Extension for generic Extension

* Refine mapping of GVK and Scheme

* Add two compatible methods
2022-05-26 08:38:10 +00:00
guqing 0f4ae08fd8
feat: add logout handler (#2110)
* feat: add logout handler

* chore: delete unused code

* fix: merge conflicts
2022-05-25 09:58:10 +00:00
guqing c5df6d3dbb
feat: add default role binding lister and role getter (#2108)
* feat: add default role binding lister and role getter

* feat: add initial capacity for role binding list
2022-05-25 07:52:10 +00:00
John Niang 9990fdd086
Upgrade to Spring Boot 3.0.0-M3 (#2102)
Please see https://github.com/spring-projects/spring-boot/releases/tag/v3.0.0-M3
2022-05-20 03:35:34 +00:00
John Niang 5f9daf4735
Add JSON schema generator and validator (#2093)
Only validate the JSON schema when saving Extension into database.
2022-05-17 16:06:12 +00:00
John Niang 264f9e39cb
Add support for Extension mechanism (#2086)
* Add support for Extension mechanism

1. Add ExtensionStore
2. Add Extension
3. Add Scheme

* Add more unit tests

* Fix checkstyle violations

* Remove unused import
2022-05-17 10:36:13 +00:00
guqing be2c0654a2
chore: add checkstyle rule (#2091)
* feat: add unused imports checkstyle rule

* feat: add java doc style rule

* fix: check style
2022-05-17 06:46:11 +00:00
John Niang 3cf2f9d7e1
Add support for API documentation (#2082) 2022-05-11 08:06:11 +00:00
guqing b4e9b54ffe
refactor: remove authorization filter and replace it with the RequestInfoAuthorizationManager (#2081) 2022-05-11 02:26:11 +00:00
John Niang 6db4f1105a
Upgrade Spring Boot to 3.0.0-M2 (#2071)
from 3.0.0-M1 to 3.0.0-M2, please refer to https://github.com/spring-projects/spring-boot/releases/tag/v3.0.0-M2
2022-05-06 09:56:13 +00:00
guqing d9bccdb5e1
feat: Add rule resolver and authorization filter (#1904)
* feat: Add request info resolver and evaluation

* feat: Add attributes record

* feat: Add rule resolver and authorization filter

* feat: Add authorization intergation test case

* chore: add todo for only testing class
2022-04-29 06:39:08 +00:00
guqing 9a0dc50653
feat: Add Principal attribute to authorizationBuilder when password authenticate successfully (#1878) 2022-04-22 09:36:11 +00:00
guqing a7b9433120
feat: Add bearer token filter config for authentication (#1876) 2022-04-22 07:36:11 +00:00
guqing 6de85184b1
feat: Add bearer token authentication filter for bearer authentication (#1872) 2022-04-22 06:36:11 +00:00
guqing e8d8ef8f28
feat: Add jwt token and provider for jwt authentication (#1871) 2022-04-22 06:00:12 +00:00
guqing 673c2068d9
feat: Add default bearer token resolver for rfc6750#section-2.1-2.3 (#1869) 2022-04-22 03:04:10 +00:00
guqing 599ab5618b
feat: Add bearer token errors for rfc6750#section-3.1 (#1868) 2022-04-21 08:46:12 +00:00
guqing c999c35a20
feat: Add bearer token and bearer authentication (#1864) 2022-04-21 07:58:12 +00:00
guqing 3f5e83fcae
chore: use providerSettings to create OAuth2TokenEndpointFilter (#1863) 2022-04-20 08:08:10 +00:00
guqing 8ac819ad14
chore: cleanup deprecated class (#1859) 2022-04-20 03:14:10 +00:00
guqing f1ccccb557
refactor: use OAuth2Password grant instead of JwtUsernamePassword authentication (#1857) 2022-04-20 03:02:10 +00:00
guqing ed6aea6245
feat: Add oauth2 refresh token authentication (#1856)
* feat: Add oauth2 refresh token authentication

* feat: Add unit test case
2022-04-19 10:16:14 +00:00
guqing ad562b4917
feat: Add InMemoryOAuth2AuthorizationService for development or testing (#1854) 2022-04-19 08:06:09 +00:00
guqing eee58989fe
feat: Allow configuration for token and refresh token time-to-live (#1853) 2022-04-19 03:16:15 +00:00
guqing 9dd778bdab
feat: Add ProviderContextHolder for token generate (#1852)
* feat: Add auhentication provider and password authentication filter

* refactor: JwtUsernamePasswordAuthenticationFilter and add test case

* chore: delete unused class

* fix: code style

* refactor: web secutity config

* feat: Add ProviderContextHolder for token generate

* chore: optimize imports
2022-04-18 06:58:13 +00:00