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
feat(inputs.redfish): Add token based authentication mechanism #15191
Comments
Hello! I recommend posting this question in our Community Slack or Community Forums, we have a lot of talented community members there who could help answer your question more quickly. You can also learn more about Telegraf by enrolling at InfluxDB University for free! Heads up, this issue will be automatically closed after 7 days of inactivity. Thank you! |
What type of system requires this auth header versus a username/password? Additionally, what happens when you set the username/password? What error do you get? |
@powersj Conversation continued in https://influxcommunity.slack.com/archives/CH99HUH8V/p1713516740749229 |
If I use redfish input plugin with this configmap:
I got the following error: [inputs.redfish] Error in plugin: received status code 401 (Unauthorized) for address https://:, expected 200. In my scenario I'can' configure ca.pem, cert.pem and key.pem but with a curl I have access to auth token. |
Looking at https://support.hpe.com/hpesc/public/docDisplay?docId=sd00002916en_us&page=GUID-691BAD62-285D-41F8-952D-58054DA9E64E.html it does appears that the login sequence requires obtaining token and then using that token for additional requests. This is different than other redfish users I've seen previously. We would need to add a new config option, something like: ## Authentication Mode
## Choose from:
## * basic_auth - Pass username and password as basic auth params
## * token - Obtain a token from /redfish/v1/SessionService/Sessions
# auth_mode = "basic_auth" In addition to obtaining the token and then using it, it does seem to expire after 12 hours per the above link, so some additional work would need to be done to ensure it is not expired and if so renew/refresh/obtain a new one. |
Indeed, that's why I instructed @ManuelPrandini to create a Feature Request for this. |
Yes, @powersj what you say is correct. The token expires every 12 hours, then must be refreshed. Yes maybe an authentication mode with this kind of mechanism could be great! |
@powersj maybe this is helpful: https://pkg.go.dev/github.com/stmcginnis/gofish |
Please direct all support questsions to slack or the forums. Thank you.
Hi to everyone,
I don't know if is already implemented, but I need to pass the auth token as parameter, when I use redfish input plugin to retrieve metrics. I don't found in the documentation any kind of field in the configuration file that give me this possibility.
Thanks in advance
The text was updated successfully, but these errors were encountered: