rightpaul.blogg.se

Splunk enterprise rest api
Splunk enterprise rest api










splunk enterprise rest api
  1. #Splunk enterprise rest api how to
  2. #Splunk enterprise rest api code

#Splunk enterprise rest api code

This code contains the following methods: Under the hood, the setup page code uses the Splunk SDK for JavaScript to post the user’s password to the storage/passwords REST API endpoint, as shown in the following code snippet. This screenshot shows a setup page, from the Developer Tutorial app, that prompts the user to create a password to complete app setup. You can use a setup page to capture this information the first time that a user runs the app.

splunk enterprise rest api

To store a secret in a Splunk app, you need to collect the associated name, password, and realm from the user. Store a Secret Using the Splunk SDK for JavaScript In this blog post, we’ll walk through an example that uses the Splunk SDK for JavaScript to store a secret and the Splunk Enterprise REST API to retrieve the secret. You can call the storage/passwords REST API endpoint to manage secret storage using the following methods: Three Ways to Manage Secret Storage in a Splunk App See Configure access control for secret storage. Note: Users require specific capabilities to store and retrieve secrets in an app.

#Splunk enterprise rest api how to

This diagram shows the workflow for how to store and retrieve secrets in an app using the storage/passwords endpoint:

splunk enterprise rest api

This API call returns the clear text, encrypted, and masked forms of the password associated with a user's credentials. To retrieve a secret from the nf file, submit a GET request to the storage/passwords endpoint. Then, call the storage/passwords endpoint to encrypt the secret and save this information in the nf file. To store a secret in an app, you first need to collect the associated name, password, and realm using a setup page. Authorized users can then retrieve and use the secret for authentication. When you store a secret in a Splunk app, the Splunk platform encrypts the secret and stores this information in the nf file. You can have multiple secrets for the same user if the realm is different.

  • Realm: The realm associated with the secret.
  • Password: The secret to encrypt and store.
  • Name: The third-party API username associated with the secret.
  • In the Splunk platform, secrets contain the following fields: Secrets allow your app’s users to authenticate with an external service and to access that service’s resources and APIs in your app. Secrets consist of sensitive data, including passwords, credentials, and API keys, that an app requires to run. You can securely store and retrieve secrets in an app using the capabilities of the Splunk platform. Does your Splunk app integrate with a third-party service or API? If so, that service might require your app’s users to authenticate using a secret.












    Splunk enterprise rest api