Allow basic auth credentials / scv metadata in external requisition URL

Description

The External Requisition Editor does not allow : or @ characters in the Host field for HTTP / HTTPS sources, which prevents basic auth credentials from being used as part of the DNS name. Ideally, this should work with SCV metadata to allow provisiond to fetch requisitions from HTTP or HTTPS URLs that require basic authentication.

 

No preference on whether this uses distinct optional username / password fields.

 

NB: The show-import Karaf shell command accepts (and works!) with basic auth credentials in the http URL:

Acceptance / Success Criteria

None

Attachments

3

Activity

Dino Yancey March 19, 2025 at 7:29 PM

Does opennms:import-requisition already allows basic auth fields in the url ?

Yes:

Chandra Gorantla March 19, 2025 at 7:21 PM

Yeah, just giving some heads-up on the task involved. Ideally instead of embedding the auth in the url, UI should allow it to enter credentials separately ( may also be specified as metadata fields). For now, we can support them with basic auth.

Does opennms:import-requisition already allows basic auth fields in the url ?

Dino Yancey March 19, 2025 at 4:59 PM

Thank you . I wasn’t thinking in terms of just updating the front end.

Chandra Gorantla March 19, 2025 at 3:42 PM

 

I believe Dino is asking to support hostnames with auth/metadata in the External requisition Editor. ( See pics attached)

This involves UI changes to allow such fields and then update Rest API to allow username/password ( directly or retrieve through metadata).

Following docs will give you more info.

Dino Yancey March 18, 2025 at 4:08 PM

need clarification on how the External Requisition Editor fetches requisitions

For an http type external requisition, as far as I know, it is an http GET request using the url parameter.

 

should they be entered manually or retrieved from SCV metadata?

Ideally, both should be possible.

 

Does the current implementation support Authorization headers, or do we need to extract credentials from the URL?

As far as I am aware they would have to be extracted from the URL, as demonstrated in the above show-import example.

 

Since show-import supports Basic Auth, should we follow the same approach?

Sure.

 

Are there any security concerns regarding credential storage/logging?

Credentials shouldn’t be logged. If they are entered as plaintext in the URL (as demonstrated above), I don’t care, as long as SCV metadata interpolation is available for the customers that require or prefer greater security.

 

Lastly, is there any documentation or code references I can follow to understand the workflow in detail?

I wouldn’t know, I am not a Java developer. I’d ask around in Engineering for suggestions.

Details

Assignee

Reporter

Labels

Components

Fix versions

Affects versions

Priority

PagerDuty

Created February 11, 2025 at 3:07 PM
Updated 3 days ago