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

Camunda Run: Offer a common way to disable the generated wadl of the rest api #4508

Closed
2 tasks done
jonathanlukas opened this issue Jul 31, 2024 · 5 comments
Closed
2 tasks done
Assignees
Labels
scope:run Changes to the Run distribution. type:feature Issues that add a new user feature to the project. version:7.22.0-alpha6 version:7.22.0

Comments

@jonathanlukas
Copy link
Contributor

jonathanlukas commented Jul 31, 2024

User Story (Required on creation)

As a infrastructure engineer, I want to be able to disable the wadl file of the rest api in a common way (via property).

Functional Requirements (Required before implementation)

Technical Requirements (Required before implementation)

  • A new Camunda Run property called disableWadl (TBD by dev) exists.
  • If the property is true, then the CustomJerseyResourceConfig disables the wadl page using the below mentioned jersey property.
  • Property can be added to the docs/user guide.

Limitations of Scope

This FR should only be valid for Camunda Run, if it would affect the spring-boot-starter, nobody would be mad after all

Hints

@danielkelemen already made a proposal on the possible fix, you only need to find a place where a new property could be mapped:

public static class CustomJerseyResourceConfig extends CamundaJerseyResourceConfig {
    public CustomJerseyResourceConfig(CamundaJerseyProperties properties) {
      setProperties(Collections.singletonMap("jersey.config.server.wadl.disableWadl", properties.isDisableWadl()));
    }
  }

  @Bean
  public CamundaJerseyResourceConfig createRestConfig(CamundaJerseyProperties properties) {
    return new CustomJerseyResourceConfig(properties);
  }

Links

https://camunda.slack.com/archives/C6M6X3EKZ/p1721627045401189

Breakdown

Pull Requests

  1. ci:rest-api ci:run
    jonathanlukas
  2. psavidis

Dev2QA handover

  • Does this ticket need a QA test and the testing goals are not clear from the description? Add a Dev2QA handover comment

Testing instructions:

The testing of the feature can be done by running camunda-run distribution and configuring the new property in production.yml in the following scenarios:

  • When the Distro is downloaded Then the camunda.bpm.run.rest.disable-wadl is set to true by default in production (ref)
  • When camunda.bpm.run.rest.disable-wadl is set to true Then the endpoint /application.wadl returns a 404 response
  • Whencamunda.bpm.run.rest.disable-wadl is set to false; Then the endpoint /application.wadl returns the WADL file content
  • Whencamunda.bpm.run.rest.disable-wadl is not set Then the endpoint /application.wadl returns the WADL file content

Reference: User Guide | Camunda Run | Choose between default and production configuration

@jonathanlukas jonathanlukas added the type:feature Issues that add a new user feature to the project. label Jul 31, 2024
@danielkelemen danielkelemen added the scope:run Changes to the Run distribution. label Aug 2, 2024
@danielkelemen
Copy link
Member

@tasso94, assigning for prioritization.

@tasso94
Copy link
Member

tasso94 commented Aug 6, 2024

Hi @jonathanlukas,

Do you want to contribute this and raise a PR?

Best,
Tassilo

@tasso94 tasso94 removed their assignment Aug 12, 2024
@psavidis psavidis assigned psavidis and unassigned mboskamp Sep 6, 2024
@tasso94 tasso94 assigned psavidis and unassigned psavidis Sep 6, 2024
psavidis added a commit that referenced this issue Sep 13, 2024
Context: Camunda-Run and Configuration of the WADL REST Endpoint

What: A new property is added that controls the WADL file, exposed via the REST API
Where: `camunda-run`

Endpoint: `/engine-rest/wadl.application`
Property: `camunda.bpm.run.rest.disable-wadl`

Values
- `true` disables the endpoint
- `false` enables the endpoint
- absence of the property has the same effect as the value `false` (endpoint is enabled)

Note: `production.yml` has the feature disabled by default

Co-authored-by: Petros Savvidis <[email protected]>
Related-to: #4508
@psavidis
Copy link
Contributor

Assigning the ticket to @danielkelemen for the review of the docs PR

@psavidis psavidis assigned danielkelemen and unassigned psavidis Sep 13, 2024
psavidis added a commit to camunda/camunda-docs-manual that referenced this issue Sep 16, 2024
Context: Exposure of WADL File REST Endpoint.
What: This PR adds Documentation for the newly added property which controls if the wadl endpoint will be accessible or not through the REST API.

Property: `camunda.bpm.run.rest.disable-wadl`
Where: User Guide | Camunda Run

Co-authored-by: Daniel Kelemen <[email protected]>

Related-to: camunda/camunda-bpm-platform#4508
@psavidis
Copy link
Contributor

Assigning to @gbetances089 for the Testing

@psavidis psavidis assigned gbetances089 and unassigned psavidis Sep 16, 2024
@gbetances089
Copy link
Member

Tested on camunda-bpm-run-ee-7.22.0-20240917.170308-93

Wadl URL: http://localhost:8080/engine-rest/application.wadl

hauptmedia added a commit to hauptmedia/operaton that referenced this issue Nov 5, 2024
Context: Camunda-Run and Configuration of the WADL REST Endpoint

What: A new property is added that controls the WADL file, exposed via the REST API
Where: `camunda-run`

Endpoint: `/engine-rest/wadl.application`
Property: `camunda.bpm.run.rest.disable-wadl`

Values
- `true` disables the endpoint
- `false` enables the endpoint
- absence of the property has the same effect as the value `false` (endpoint is enabled)

Note: `production.yml` has the feature disabled by default

Co-authored-by: Petros Savvidis <[email protected]>
Related-to: camunda/camunda-bpm-platform#4508

Backported commit 56673650f7 from the camunda-bpm-platform repository.
Original author: Jonathan Lukas <[email protected]>
javahippie pushed a commit to operaton/operaton that referenced this issue Nov 7, 2024
Context: Camunda-Run and Configuration of the WADL REST Endpoint

What: A new property is added that controls the WADL file, exposed via the REST API
Where: `camunda-run`

Endpoint: `/engine-rest/wadl.application`
Property: `camunda.bpm.run.rest.disable-wadl`

Values
- `true` disables the endpoint
- `false` enables the endpoint
- absence of the property has the same effect as the value `false` (endpoint is enabled)

Note: `production.yml` has the feature disabled by default

Co-authored-by: Petros Savvidis <[email protected]>
Related-to: camunda/camunda-bpm-platform#4508

Backported commit 56673650f7 from the camunda-bpm-platform repository.
Original author: Jonathan Lukas <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope:run Changes to the Run distribution. type:feature Issues that add a new user feature to the project. version:7.22.0-alpha6 version:7.22.0
Projects
None yet
Development

No branches or pull requests

6 participants