Skip to content

Commit 7fe35f6

Browse files
authored
4.x: Metrics and OpenAPI have permitAll by default (helidon-io#7789)
* Metrics and OpenAPI have permitAll by default Fixed all tests and examples that use it Disabled intermittently failing test * Fix wrong config of quickstart * Typo fix
1 parent 4542621 commit 7fe35f6

25 files changed

Lines changed: 20 additions & 103 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ For Helidon 1.x releases please see [Helidon 1.x CHANGELOG.md](https://github.co
2222
* CorsFeature is a new WebServer feature
2323
* TracingFeature is now an observability feature
2424
* Features use common config dependency - can still pass `io.helidon.Config` instance to them, only changes in SPI
25-
* Metrics in SE now require user in `observe` role, or `metrics.permit-all` set to `true`, otherwise 403 is returned
26-
* OpeanAPI in SE now requires user in `openapi` role, or `openapi.permit-all` set to `true`, otherwise 403 is returned
25+
* Metrics in SE endpoint is permitted to all, unless `metrics.permit-all` is set to `false`
26+
* OpenAPI in SE endpoint is permitted to all, unless `openapi.permit-all` is set to `false`
2727

2828
## [4.0.0-RC1]
2929

archetypes/helidon/src/main/archetype/common/observability.xml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -300,21 +300,6 @@ curl -H 'Accept: application/json' -X GET http://localhost:8080/metrics
300300
</model>
301301
</output>
302302
</boolean>
303-
<output>
304-
<model>
305-
<list key="application-yaml-entries">
306-
<value><![CDATA[
307-
metrics:
308-
permit-all: true
309-
]]></value>
310-
</list><list key="config-test">
311-
<value><![CDATA[
312-
metrics:
313-
permit-all: true
314-
]]></value>
315-
</list>
316-
</model>
317-
</output>
318303
</inputs>
319304
</boolean>
320305
<boolean id="health"

examples/cors/src/main/resources/application.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ server:
2121
port: 8080
2222
host: 0.0.0.0
2323

24-
metrics:
25-
permit-all: true
26-
2724
restrictive-cors:
2825
allow-origins: ["http://foo.com", "http://there.com"]
2926
allow-methods: ["PUT", "DELETE"]

examples/metrics/exemplar/src/main/resources/application.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,3 @@ server:
2222
host: 0.0.0.0
2323
tracing:
2424
service: "hello-world"
25-
metrics:
26-
permit-all: true

examples/metrics/filtering/se/src/main/resources/application.yaml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,6 @@ app:
2020
server:
2121
port: 8080
2222
host: 0.0.0.0
23-
# experimental:
24-
# http2:
25-
# enable: true
26-
# max-content-length: 16384
23+
2724
tracing:
2825
service: "hello-world"
29-
metrics:
30-
permit-all: true

examples/metrics/http-status-count-se/src/main/resources/application.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,3 @@ server:
2020

2121
app:
2222
greeting: "Hello"
23-
24-
metrics:
25-
permit-all: true

examples/metrics/http-status-count-se/src/test/resources/application.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,3 @@ server:
2020

2121
app:
2222
greeting: "Hello"
23-
24-
metrics:
25-
permit-all: true

examples/metrics/kpi/src/main/resources/application.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,3 @@ metrics:
2626
extended: true
2727
long-running:
2828
threshold-ms: 2000 # two seconds
29-
permit-all: true

examples/openapi/src/main/resources/application.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,3 @@ app:
2020
server:
2121
port: 8080
2222
host: 0.0.0.0
23-
features:
24-
openapi:
25-
permit-all: true
26-
27-
metrics:
28-
permit-all: true

examples/quickstarts/helidon-quickstart-se/src/main/resources/application.yaml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,9 @@ server:
2323
# default behavior to discover Server features (observability, openapi, metrics)
2424
# features-discovers-services: true
2525
# all of the below is discovered automatically
26-
features:
26+
# features:
2727
# observe:
2828
# observers:
2929
# metrics:
3030
# health:
3131
# enabled: false
32-
openapi:
33-
permit-all: true
34-
35-
metrics:
36-
permit-all: true

0 commit comments

Comments
 (0)