Bre77 / badrcm

Brett Adams' Dangerous REST Config Manager
4 stars 0 forks source link

Servers-> Add button disabled #5

Open gitusertf opened 5 months ago

gitusertf commented 5 months ago

Installed Remote Config Manager 1.0 on Splunk Enterprise 9.1.2 (developer licensed). After populating the Splunk Hostname in the Add New Server form, the "Add" button remains disabled. BAD_RCM_2024-01-18_10-42-05

Bre77 commented 5 months ago

That's because you haven't put in an auth token.

If you're trying to edit the local system there is a preconfigured local system.

gitusertf commented 5 months ago

Nope, still disabled. I'm using Splunk Enterprise 9.1.2 with a developer's license. Could it be a capabilities problem? Logged into Splunk as admin which has admin, power, user, sc_admin roles. badRCM-servers-add_2024-01-23_08-53-16

Bre77 commented 5 months ago

The button gets disabled by client side JavaScript, so its nothing to do with your capabilities or licence.

The server field has to be at least 3 characters and the auth token has to be at least 100.

https://github.com/Bre77/badrcm/blob/e215466cdd30184eabfa66c3e043b76459254d92/src/main/webapp/pages/servers/index.jsx#L149

If Splunk is generating you auth tokens less than 100 characters long, I'll have to go and edit that logic, but in my experience they have always been longer.

gitusertf commented 5 months ago

It's the auth token length. Splunk is generating 64 character long tokens.

Bre77 commented 5 months ago

You are copying your auth tokens from the Tokens page after they are created, they are truncated to 64 characters. You need to copy the full auth token from the creation page. This is exactly why the 100 character minimum was implemented.

image

gitusertf commented 5 months ago

Yes, you are correct. Thank you. It looks like the "actual" auth token generated by Splunk is 453 characters! Add button works with the actual troken (>100 chars). Thanks again.