Skip to content
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

feat: added permissions to openapi and helm #62

Merged
merged 1 commit into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions docs/modules/onecx-shell-bff/pages/onecx-shell-bff-docs.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,17 @@ app:
image:
repository: "onecx/onecx-shell-bff"
operator:
# Permission
permission:
enabled: true
spec:
permissions:
workspaceConfig:
read: permission on all GET requests and POST search
userProfile:
read: permission on all GET requests and POST search
permission:
read: permission on all GET requests and POST search
keycloak:
client:
enabled: true
Expand Down
54 changes: 27 additions & 27 deletions docs/modules/onecx-shell-bff/pages/onecx-shell-bff-extensions.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,25 @@ h| Version

| https://quarkus.io/guides/rest[Link]
| https://github.com/quarkusio/quarkusio.github.io/blob/develop/_generated-doc/latest/config/quarkus-rest.adoc[Link]
| 3.13.2
| 3.14.4

| quarkus-smallrye-openapi

| https://quarkus.io/guides/openapi-swaggerui[Link]
| https://github.com/quarkusio/quarkusio.github.io/blob/develop/_generated-doc/latest/config/quarkus-smallrye-openapi.adoc[Link]
| 3.13.2
| 3.14.4

| quarkus-rest-jackson

| https://quarkus.io/guides/rest-json[Link]
|
| 3.13.2
| 3.14.4

| quarkus-smallrye-health

| https://quarkus.io/guides/smallrye-health[Link]
| https://github.com/quarkusio/quarkusio.github.io/blob/develop/_generated-doc/latest/config/quarkus-smallrye-health.adoc[Link]
| 3.13.2
| 3.14.4

| quarkus-openapi-generator

Expand All @@ -42,98 +42,98 @@ h| Version

| https://quarkus.io/guides/rest-client[Link]
|
| 3.13.2
| 3.14.4

| tkit-quarkus-log-cdi

| https://1000kit.github.io/tkit-quarkus/current/tkit-quarkus/tkit-quarkus-log-cdi.html[Link]
| https://github.com/1000kit/tkit-quarkus/blob/2.31.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-log-cdi.adoc[Link]
| 2.31.0
| https://github.com/1000kit/tkit-quarkus/blob/2.32.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-log-cdi.adoc[Link]
| 2.32.0

| tkit-quarkus-log-rs

| https://1000kit.github.io/tkit-quarkus/current/tkit-quarkus/tkit-quarkus-log-rs.html[Link]
| https://github.com/1000kit/tkit-quarkus/blob/2.31.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-log-rs.adoc[Link]
| 2.31.0
| https://github.com/1000kit/tkit-quarkus/blob/2.32.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-log-rs.adoc[Link]
| 2.32.0

| tkit-quarkus-log-json

| https://1000kit.github.io/tkit-quarkus/current/tkit-quarkus/tkit-quarkus-log-json.html[Link]
| https://github.com/1000kit/tkit-quarkus/blob/2.31.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-log-json.adoc[Link]
| 2.31.0
| https://github.com/1000kit/tkit-quarkus/blob/2.32.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-log-json.adoc[Link]
| 2.32.0

| tkit-quarkus-rest

| https://1000kit.github.io/tkit-quarkus/current/tkit-quarkus/tkit-quarkus-rest.html[Link]
| https://github.com/1000kit/tkit-quarkus/blob/2.31.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-rest.adoc[Link]
| 2.31.0
| https://github.com/1000kit/tkit-quarkus/blob/2.32.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-rest.adoc[Link]
| 2.32.0

| tkit-quarkus-rest-context

| https://1000kit.github.io/tkit-quarkus/current/tkit-quarkus/tkit-quarkus-rest-context.html[Link]
| https://github.com/1000kit/tkit-quarkus/blob/2.31.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-rest-context.adoc[Link]
| 2.31.0
| https://github.com/1000kit/tkit-quarkus/blob/2.32.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-rest-context.adoc[Link]
| 2.32.0

| tkit-quarkus-security

| https://1000kit.github.io/tkit-quarkus/current/tkit-quarkus/tkit-quarkus-security.html[Link]
| https://github.com/1000kit/tkit-quarkus/blob/2.31.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-security.adoc[Link]
| 2.31.0
| https://github.com/1000kit/tkit-quarkus/blob/2.32.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-security.adoc[Link]
| 2.32.0

| quarkus-hibernate-validator

| https://quarkus.io/guides/validation[Link]
| https://github.com/quarkusio/quarkusio.github.io/blob/develop/_generated-doc/latest/config/quarkus-hibernate-validator.adoc[Link]
| 3.13.2
| 3.14.4

| onecx-permissions

| https://onecx.github.io/docs/onecx-quarkus/current/onecx-quarkus/onecx-permissions.html[Link]
| https://github.com/onecx/onecx-quarkus/blob/0.26.0/docs/modules/onecx-quarkus/pages/includes/onecx-permissions.adoc[Link]
| 0.26.0
| https://github.com/onecx/onecx-quarkus/blob/0.30.0/docs/modules/onecx-quarkus/pages/includes/onecx-permissions.adoc[Link]
| 0.30.0

| quarkus-oidc

| https://quarkus.io/guides/security-oidc-bearer-token-authentication-tutorial[Link]
| https://github.com/quarkusio/quarkusio.github.io/blob/develop/_generated-doc/latest/config/quarkus-oidc.adoc[Link]
| 3.13.2
| 3.14.4

| onecx-core

| https://onecx.github.io/docs/onecx-quarkus/current/onecx-quarkus/onecx-core.html[Link]
|
| 0.26.0
| 0.30.0

| quarkus-micrometer-registry-prometheus

| https://quarkus.io/guides/telemetry-micrometer[Link]
| https://github.com/quarkusio/quarkusio.github.io/blob/develop/_generated-doc/latest/config/quarkus-micrometer-registry-prometheus.adoc[Link]
| 3.13.2
| 3.14.4

| quarkus-opentelemetry

| https://quarkus.io/guides/opentelemetry[Link]
| https://github.com/quarkusio/quarkusio.github.io/blob/develop/_generated-doc/latest/config/quarkus-opentelemetry.adoc[Link]
| 3.13.2
| 3.14.4

| quarkus-arc

| https://quarkus.io/guides/cdi-reference[Link]
| https://github.com/quarkusio/quarkusio.github.io/blob/develop/_generated-doc/latest/config/quarkus-arc.adoc[Link]
| 3.13.2
| 3.14.4

| quarkus-container-image-docker

| https://quarkus.io/guides/container-image[Link]
| https://github.com/quarkusio/quarkusio.github.io/blob/develop/_generated-doc/latest/config/quarkus-container-image-docker.adoc[Link]
| 3.13.2
| 3.14.4


| quarkus-rest-client-oidc-filter

|
|
| 3.13.2
| 3.14.4


|===
24 changes: 13 additions & 11 deletions docs/modules/onecx-shell-bff/pages/onecx-shell-bff.adoc
Original file line number Diff line number Diff line change
@@ -1,46 +1,48 @@

:summaryTableId: onecx-shell-bff
[.configuration-legend]
icon:lock[title=Fixed at build time] Configuration property fixed at build time - All other configuration properties are overridable at runtime
[.configuration-reference.searchable, cols="80,.^10,.^10"]
|===

h|[[onecx-shell-bff_configuration]]link:#onecx-shell-bff_configuration[Configuration property]

h|[.header-title]##Configuration property##
h|Type
h|Default

a| [[onecx-shell-bff_onecx-shell-permissions-cache-enabled]]`link:#onecx-shell-bff_onecx-shell-permissions-cache-enabled[onecx.shell.permissions.cache-enabled]`

a| [[onecx-shell-bff_onecx-shell-permissions-cache-enabled]] [.property-path]##`onecx.shell.permissions.cache-enabled`##

[.description]
--
Enable or disable caching


ifdef::add-copy-button-to-env-var[]
Environment variable: env_var_with_copy_button:+++ONECX_SHELL_PERMISSIONS_CACHE_ENABLED+++[]
endif::add-copy-button-to-env-var[]
ifndef::add-copy-button-to-env-var[]
Environment variable: `+++ONECX_SHELL_PERMISSIONS_CACHE_ENABLED+++`
endif::add-copy-button-to-env-var[]
--|boolean
--
|boolean
|`true`


a| [[onecx-shell-bff_onecx-shell-permissions-key-separator]]`link:#onecx-shell-bff_onecx-shell-permissions-key-separator[onecx.shell.permissions.key-separator]`

a| [[onecx-shell-bff_onecx-shell-permissions-key-separator]] [.property-path]##`onecx.shell.permissions.key-separator`##

[.description]
--
select default key separator


ifdef::add-copy-button-to-env-var[]
Environment variable: env_var_with_copy_button:+++ONECX_SHELL_PERMISSIONS_KEY_SEPARATOR+++[]
endif::add-copy-button-to-env-var[]
ifndef::add-copy-button-to-env-var[]
Environment variable: `+++ONECX_SHELL_PERMISSIONS_KEY_SEPARATOR+++`
endif::add-copy-button-to-env-var[]
--|string
--
|string
|`#`

|===
|===


:!summaryTableId:
11 changes: 11 additions & 0 deletions src/main/helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@ app:
image:
repository: "onecx/onecx-shell-bff"
operator:
# Permission
permission:
enabled: true
spec:
permissions:
workspaceConfig:
read: permission on all GET requests and POST search
userProfile:
read: permission on all GET requests and POST search
permission:
read: permission on all GET requests and POST search
keycloak:
client:
enabled: true
Expand Down
20 changes: 20 additions & 0 deletions src/main/openapi/openapi-bff.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ servers:
paths:
/workspaceConfig:
post:
x-onecx:
permissions:
workspaceConfig:
- read
tags:
- "WorkspaceConfig"
description: Load all data needed by startup of OneCX UI (components, routes, slots, theme, workspace)
Expand Down Expand Up @@ -41,6 +45,10 @@ paths:
description: 'Not Found'
/workspaceConfig/themes/{name}/favicon:
get:
x-onecx:
permissions:
workspaceConfig:
- read
tags:
- "WorkspaceConfig"
description: Load favicon by theme name
Expand All @@ -66,6 +74,10 @@ paths:

/workspaceConfig/themes/{name}/logo:
get:
x-onecx:
permissions:
workspaceConfig:
- read
tags:
- "WorkspaceConfig"
description: Load logo by theme name
Expand All @@ -91,6 +103,10 @@ paths:

/userProfile:
get:
x-onecx:
permissions:
userProfile:
- read
tags:
- userProfile
operationId: getUserProfile
Expand All @@ -112,6 +128,10 @@ paths:

/permissions:
post:
x-onecx:
permissions:
permission:
- read
tags:
- permission
operationId: getPermissions
Expand Down
Loading