You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/modules/ROOT/pages/getting-started/assembly-configuring-registry-security.adoc
+84Lines changed: 84 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,7 @@ This chapter explains how to set configuration options for {registry} security.
9
9
* xref:registry-security-keycloak_{context}[]
10
10
* xref:registry-security-azure_{context}[]
11
11
* xref:registry-security-settings_{context}[]
12
+
* xref:registry-cors-configuration_{context}[]
12
13
13
14
NOTE: For a list of all available configuration options, see {registry-config-reference}.
14
15
@@ -652,3 +653,86 @@ calls to the REST API, set the following options to `true`:
652
653
* For details on configuring custom authentication for {registry}, the see https://quarkus.io/guides/security-openid-connect-web-authentication[Quarkus Open ID Connect documentation]
Cross-Origin Resource Sharing (CORS) is a browser security feature that controls how web applications running at one origin can request resources from a different origin. {registry} includes built-in CORS support that you can configure to allow the {registry} web console or other client applications to access the {registry} REST API from different domains.
665
+
666
+
CORS configuration in {registry} is based on the underlying Quarkus HTTP CORS filter. By default, {registry} enables CORS and allows requests from `http://localhost:8888` and `http://127.0.0.1:8888` for local development.
667
+
668
+
.Prerequisites
669
+
* {registry} is installed and running.
670
+
671
+
.Procedure
672
+
673
+
Configure the following environment variables to customize CORS behavior for your {registry} deployment:
|Enables or disables the CORS filter. Set to `true` to enable CORS support.
684
+
|`true`
685
+
686
+
|`QUARKUS_HTTP_CORS_ORIGINS`
687
+
|A comma-separated list of allowed origins for CORS requests. Use `*` to allow all origins, or specify explicit origins such as `\https://my-ui.example.com`. For multiple origins, use a comma-separated list, for example: `\https://ui1.example.com,\https://ui2.example.com`.
688
+
|`http://localhost:8888,http://127.0.0.1:8888`
689
+
690
+
|`QUARKUS_HTTP_CORS_METHODS`
691
+
|A comma-separated list of HTTP methods allowed for CORS requests.
692
+
|`GET,PUT,POST,PATCH,DELETE,OPTIONS`
693
+
694
+
|`QUARKUS_HTTP_CORS_HEADERS`
695
+
|A comma-separated list of HTTP headers allowed in CORS requests. This includes custom {registry} headers used for artifact metadata.
WARNING: Using `*` to allow all origins is not recommended for production deployments. Always specify explicit allowed origins in production environments.
If you are using the {registry} Operator, you can configure CORS in the `ApicurioRegistry3` custom resource:
719
+
[source,yaml]
720
+
----
721
+
apiVersion: registry.apicur.io/v1
722
+
kind: ApicurioRegistry3
723
+
metadata:
724
+
name: my-registry
725
+
spec:
726
+
app:
727
+
env:
728
+
- name: QUARKUS_HTTP_CORS_ORIGINS
729
+
value: https://ui.example.com
730
+
----
731
+
732
+
NOTE: When using the {registry} Operator with an Ingress configured for the UI component, the operator automatically configures CORS allowed origins based on the Ingress host. If you explicitly set `QUARKUS_HTTP_CORS_ORIGINS` in the CR, your configuration takes precedence.
733
+
734
+
[role="_additional-resources"]
735
+
.Additional resources
736
+
* For detailed information about all available Quarkus CORS configuration options, see the link:https://quarkus.io/guides/http-reference#cors-filter[Quarkus HTTP Reference - CORS Filter] documentation.
0 commit comments