Skip to content

OpenCTI app button in UI links to the API URL even if separate URL and API URL are present #3087

Open
@rubyroobs

Description

@rubyroobs

Description

UI links to the API URL base for OpenCTI even if separate URL and API URL are present

For example, even with the below config the link to OpenCTI in the UI would be https://api-opencti-url.example.com

openbas.xtm.opencti.enable=true
openbas.xtm.opencti.url=https://public-opencti-url.example.com
openbas.xtm.opencti.api_url=https://api-opencti-url.example.com/graphql
openbas.xtm.opencti.token=abcdef123456

Environment

OpenBAS 1.15.2

Expected Output

The OpenCTI app button links to https://public-opencti-url.example.com

Actual Output

The OpenCTI app button links to https://api-opencti-url.example.com

Proposed Fix

  1. Replace getUrl in OpenCTIConfig with getPublicUrl and getApiUrl or similar (permalink)
  2. Update calls to getUrl to getPublicUrl in PlatformSettingsService (permalink)
  3. Update calls to getUrl to getApiUrl in OpenCTIService (permalink)

Screenshots (optional)

Image

Metadata

Metadata

Assignees

Labels

buguse for describing something not working as expected

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions