Skip to content
cccskills
FreePublished on GitHub

manage-credentials

Set up and manage package and connection credentials securely

The English summary is being prepared. Showing the original description.

See how to install

Files included (1)

  • SKILL.md3.1 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Manage Credentials

Help the user store, retrieve, and manage security credentials for packages and database connections.

Usage

/manage-credentials [package-name] [--connection <connection-name>]

Instructions

1. Read package credentials in code

const creds = await _package.getCredentials();
if (creds === null) {
  grok.shell.info('Credentials are not set.');
  return;
}
const login = creds.parameters['login'];
const password = creds.parameters['password'];

Read a single parameter:

const creds = await _package.getCredentials();
const apiKey = creds.parameters['apiKey'];

2. Set package credentials via API

Send a POST request to the credentials endpoint:

const grokHost = 'https://your-instance.datagrok.ai';
const packageName = 'MyPackage';
const url = `${grokHost}/api/credentials/for/${packageName}`;

const headers = {
  'Authorization': apiKey,
  'Content-Type': 'application/json'
};

const credentials = {login: 'myLogin', password: 'myPassword'};
await fetch(url, {method: 'POST', headers, body: JSON.stringify(credentials)});

3. Set package credentials via UI

  1. Go to Manage | Packages
  2. Right-click the package > Credentials...
  3. Add key-value pairs
  4. Set Credentials owner (a user or group — only members can read)

4. Connection credentials in JSON

Define credentials in the connection JSON file using environment variable substitution:

{
  "#type": "DataConnection",
  "name": "MyDb",
  "parameters": {
    "server": "db.example.com",
    "port": 5432,
    "db": "mydb"
  },
  "credentials": {
    "parameters": {
      "login": "${DB_LOGIN}",
      "password": "${DB_PASSWORD}"
    }
  },
  "dataSource": "Postgres"
}

5. Set connection credentials via API

For connections that belong to a package, use a dotted name:

POST ${GROK_HOST}/api/credentials/for/${PACKAGE_NAME}.${CONNECTION_NAME}
Headers: { Authorization: <API_KEY>, Content-Type: application/json }
Body: { "login": "...", "password": "..." }

6. Service users

For automated credential management, create a service user:

  1. Go to Manage | Users | Actions | Add Service User
  2. Specify a login and generate an API key
  3. Use the service user's API key for programmatic credential setup

Behavior

  • Never commit credentials or secrets in JSON files to the repository.
  • Always use environment variable substitution (${VAR_NAME}) in connection files for sensitive values.
  • When the user needs to store API keys or tokens, guide them to package credentials (_package.getCredentials()).
  • When the user needs database login/password, guide them to connection credentials.
  • Remind users about the Credentials owner field — it controls who can read the credentials.
  • For examples, refer to the NLP package and packages/ApiSamples/scripts/misc/package-credentials.

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Add support for a new curve data format in the Curves package converter system

The English summary is being prepared. Showing the original description.

datagrok-ai/public74Updated Oct 19, 2026

Create info panels that appear in the context panel based on semantic types

The English summary is being prepared. Showing the original description.

datagrok-ai/public74Updated Oct 19, 2026

Add a new single-objective optimization algorithm to the sci-comp library. Use when the user asks to implement a new optimizer (e.g. gradient descent, BFGS, simulated annealing, differential evolution).

The English summary is being prepared. Showing the original description.

datagrok-ai/public74Updated Oct 19, 2026

Add unit tests to a Datagrok package

The English summary is being prepared. Showing the original description.

datagrok-ai/public74Updated Oct 19, 2026

Answer a "how do I …" question about the platform with a Gherkin scenario on @datagrok-libraries/bdd that is filmed into a how-to video (grok-bdd guide), so the answer is demonstrated, sent as a video plus numbered steps, and kept as a regression test; the same scenarios, filmed in help mode, are the GIFs of the help pages

The English summary is being prepared. Showing the original description.

datagrok-ai/public74Updated Oct 19, 2026

Translate hand-written Playwright specs (or any existing UI tests) into Gherkin features on @datagrok-libraries/bdd, then prove the features test what they claim by backward-matching them against the originals with independent reviewers, and fix the gaps in the core, the library and the features

The English summary is being prepared. Showing the original description.

datagrok-ai/public74Updated Oct 19, 2026

See all skills by datagrok-ai

Report a problem with this skill