Skip to Content

Credentials

Keep B2C accounts, access keys and API clients in the IDE password safe or one shared encrypted file, never in a dw.json that AI agents can read

The B2C Credentials tool window holds every secret the plugin uses: Business Manager accounts, their per-host access keys and OCAPI API clients. Open it from its button on the right tool window bar, below B2C Explorer. Connections only point at an account or a client, so one account can serve many instances

The window has three tabs: Accounts, API Clients and Settings. Each list tab has Add, Remove, Edit and Show Connections. Every row says what it holds, such as Password saved or Access keys for 1 host, and how many connections use it. Double-click a row to edit it, right-click it to copy its values, and type to speed-search the list

Why credentials live here

Most SFCC tools and editor extensions read the instance password from a dw.json file in each project. Intellij SFCC keeps secrets out of the project instead:

  • One account, every instance. Connections refer to an account by its username. Change the password once and every connection that uses it picks it up
  • Nothing secret to commit. The project never needs a dw.json, so no password can slip into a commit or a pull request
  • Nothing secret for AI agents to read. See Safe from AI coding agents
  • One setup for all your editors and machines. Link one encrypted file and VS Code, every JetBrains IDE and every synced machine get the same accounts and clients
dw.json in each projectB2C Credentials
Where the password is storedPlain text in the project folderThe IDE password safe, or one encrypted file you choose
Readable by coding agentsYes, it is a project fileNo secret in the project
Can end up in a commitYes, unless every copy is ignoredNo
Password changeEdit every copyEdit one account
Several machinesCopy the file by handLink one encrypted file
Access keys and API clientsRepeated in each fileStored once, per host and per client
Every account, password, access key and API client is kept encrypted in sfcc-b2c.creds, and the project never needs a dw.json, so an AI agent finds no password to read. Connections only point at an account, so 2 usages means two sandboxes sign in with one password you change once, and VS Code and your other JetBrains IDEs link the same file

Safe from AI coding agents

An AI coding agent works with everything in your project. Give it a dw.json and it holds your sandbox password in plain text, one step from the chat, your disk and your next commit

The same request to an AI coding agent, three times. With a dw.json in the project the password ends up in the chat, even when a rule blocks one tool. With B2C Credentials the project holds no secret to find

No real block means the password is already out

An agent with a dw.json in reach reads it sooner or later. It is not a question of if, only of when. Unless a deny rule or a hook blocks every way to read the file, treat that password as leaked

Why agents always find it

  • It is the first file they look for. Ask for a deploy, an upload or a log check, and the agent looks for how the project connects. In an SFCC project, that is dw.json
  • Nobody has to mention it. Agents explore the project on their own before they act
  • Searches print it. A grep for a hostname or a password prints the whole matching line
  • .gitignore doesn't hide it. Ignoring the file keeps it out of commits, not out of the agent's reach
  • Once read, it spreads. The password goes to the model with the rest of the chat, lands in the agent's session log on your disk, and can surface in generated code, commits and pull requests
  • Anything can ask for it. A prompt hidden in a README, an issue or a web page can tell the agent to send what it has read somewhere else

Rules leak too

A rule protects the file only if it covers every way in:

  • A deny rule for the agent's file read tool doesn't stop a shell grep that never names the file, or a script that opens it, such as node -e "require('./dw.json')"
  • A hook sees only the command text, so a file read inside a script gets past it
  • Claude Code recommends OS-level blocking with its sandbox (sandbox.filesystem.denyRead) on top of Read deny rules
  • Test with a fake dw.json. If the agent can print the fake password, it can print the real one

Nothing to find with Intellij SFCC

With the default storage, the project holds no secret at all:

  • Secrets go to the IDE password safe. Passwords, access keys and client secrets are saved where the IDE keeps its own passwords: the macOS Keychain, KeePass or your system keyring, as set in Settings › Appearance & Behavior › System Settings › Passwords
  • The project keeps only references. Connection settings record which account and API client each connection uses, by username, client ID and hostname
  • No dw.json. The plugin never writes one. It imports an existing dw.json once, the first time the project opens, and never reads it again, but it doesn't delete it. Delete the file yourself in every project where agents work

Where credentials are saved

The first time you add an account or an API client, Choose Where to Save Credentials asks where this IDE keeps them:

  • IDE Password Safe saves them where the IDE keeps its own passwords. Only this IDE on this machine sees them
  • Shared credentials file keeps them in one encrypted .creds file that VS Code, your other JetBrains IDEs and your other machines can use too. Pick Create a new file or Use a file I already have

Add account in Getting Started and + next to Account or API client in the connection editor ask the same question. The built-in test client doesn't count as a first credential. Change your choice at any time on the Settings tab, see Sync credentials to a file

Accounts

Add opens New Account with Username and Password. Double-click an account to edit it: the eye button shows the stored password, the copy buttons copy the username or password. The password field stays disabled, with the tooltip Loading stored credentials…, until the stored secret has loaded, so a slow password safe never saves an empty password

Open B2C Credentials from its button on the right tool window bar. Each account shows what it holds and how many connections use it, and a warning marks one with no password or access key. Double-click an account to edit it: the eye shows the stored password, and Access Keys holds per-host keys that replace the password where an instance requires them
  • The username must use the same text case as on the instance, or turn on Use lowercase username on authentication requests in Connections
  • No password or access key under an account means it can't sign in anywhere. Edit it and enter the password
  • Remove deletes one account at a time, after a confirmation. Connections that use it stop working
  • Use one account per Business Manager user, not per instance. The connection decides where it is used

Access keys

Access keys replace the password for one host and one purpose. Use them when an instance doesn't accept the Business Manager password for WebDAV

  1. Double-click the account. The Access Keys table appears only for existing accounts
  2. Click + in the Access Keys table and pick the Hostname. Type part of it for suggestions
  3. Paste the keys you generated in Business Manager and click Add
KeyUsed for
WebDAV File Access and UX StudioUploads, deploys, B2C Explorer and the debugger. Used instead of the password for that host
Agent User Login and OCAPIStored for copying only. The plugin doesn't send it
Protected Storefront AccessStored for copying only, for protected storefronts. The plugin doesn't send it

The table shows one row per host with a check for each key it holds. Removing a row asks "Delete Access Keys for" hostname first

Connections that use it

The right end of every account and API client row shows how many connections use it, such as 2 usages. Click it, or select the row and click Show Connections, to list those connections with their hosts. Pick one to reveal it in B2C Explorer. The count follows your connection changes, so check it before you remove an account: No usages means nothing breaks

Click 2 usages to list the connections that sign in with the account, the active one marked and each with its host. Show Connections on the toolbar opens the same list for the selected row

Copy values

Right-click an account for Copy Username and Copy Password. Paste the password where you sign in, such as Account Manager or a WebDAV client, without keeping it in a note or a chat. With a credentials file linked, an Access Keys section adds one submenu per host with Copy WebDAV File Access Key, Copy OCAPI Access Key and Copy Storefront Access Key. Show Connections at the bottom lists the connections that use the account

Right-click an account in B2C Credentials for Copy Username and Copy Password, then paste wherever you sign in. The password never has to sit in a note, a chat or a dw.json

API clients

API clients power code version activation, jobs and On-Demand Sandboxes. On the API Clients tab, Add opens New OCAPI Credentials with Name, Client ID and Client Secret. Give each client a name, so connection settings show Storefront or Integration instead of a long ID. A named client shows its client ID under the name, and No client secret marks one that can't authenticate

The API Clients tab holds the OCAPI and SCAPI clients for code version activation, jobs and sandboxes, each with its client ID and the connections that use it. OOTB Test Creds works on sandboxes without Account Manager setup and can't be deleted

The built-in OOTB Test Creds client works on sandboxes and test systems without any Account Manager setup. The instance still needs OCAPI permissions for it, see OCAPI & Jobs. It can't be deleted: Remove skips it, and shows Test credentials can not be deleted when it is the only client selected

Remove deletes several selected clients after one confirmation. Right-click a client to Copy Client ID or Copy Client Secret. Pick the client in a connection's OCAPI tab or in On-Demand Sandboxes

Sync credentials to a file

By default credentials live in the IDE password safe on one machine. A shared credentials file keeps them in one encrypted .creds file instead. VS Code and your other JetBrains IDEs can link the same file, and a synced folder such as iCloud Drive or OneDrive takes it to your other machines. A new laptop is ready after one file pick and one secret key

The Settings tab shows where this IDE saves credentials. Without a file it offers Create File… and Use Existing File…, and the credentials already saved in this IDE move into the file

Create a file

On the Settings tab, Create File… saves your accounts, access keys and API clients to an encrypted sfcc-b2c.creds in any folder, a synced drive included. Keep its secret key in your password manager: VS Code, other IDEs and other machines need it to open the file

Choose where to save it

On the Settings tab, click Create File…. Name the file, sfcc-b2c.creds by default, and pick any folder, a synced drive included. The plugin never writes over a file that already holds credentials: it offers Use This File… or Choose Another Name… instead

Keep the secret key

sfcc-b2c.creds is ready shows the 24-character secret key that encrypts the file. Click Copy Key and save it in your password manager. This IDE keeps the key in its password safe, and the Secret Key group on the Settings tab shows it again whenever you need it

Use an existing file

On another machine or in another IDE, click Use Existing File… on the Settings tab and pick the .creds file. Enter its secret key in Open sfcc-b2c.creds and click Open File. A key that doesn't open the file is refused before anything changes. A balloon confirms the link with the number of accounts and API clients

In another IDE or on another machine, Use Existing File… opens the .creds file on your synced drive or the one your team shares. Paste its secret key once, and every account and API client arrives

The file works across editors. To share the file VS Code created, copy its key from the VS Code Credentials view and link the same file here

Manage the linked file

The Credentials File group shows the file's path, its account and API client counts and its last update

While a file is linked, changes made here are saved to it at once, and changes from VS Code, another IDE or a sync client load on their own. Reload from File reads it on demand, and when the file goes missing, Restore File writes it back from the credentials this IDE has
ButtonWhat it does
Reveal in FinderShows the file in the system file manager. The name follows your system, such as Show in Explorer on Windows
Reload from FileReads the file again right now
Show and Copy in Secret KeyShow or copy the key, to link the file in another editor or on another machine
Unlink FileStops using the file in this IDE. The file stays for VS Code and other IDEs, and the IDE password safe, which already holds a copy of every credential, takes over
Delete File…Deletes the file from disk for every editor that uses it. This IDE keeps its copy in the password safe

While a file is linked, every change in B2C Credentials is written to it at once. Changes saved by VS Code, another IDE or a sync client load within about a second, confirmed by a B2C Credentials Updated balloon. You enter the secret key once per machine. The plugin never uploads the file to an instance, even when it sits in a cartridge folder

When the file moves or disappears

When the file is moved, renamed or deleted outside the IDE, a sfcc-b2c.creds is missing balloon stays until you pick an action, and the Settings tab offers the same actions. The credentials this IDE loaded stay available, and nothing is written until the file is back

ActionWhat it does
Restore FileWrites the file again at the same path, from the credentials this IDE has
Locate File…Links the file at its new place
Unlink FileGoes back to the IDE password safe

When the file comes back on its own, for example once a sync client finishes, the balloon closes and the IDE syncs again. If another editor re-created the file with a new secret key, the Settings tab asks you to Enter the secret key, and this IDE works with its password safe copies until then

Anyone who has both the file and the secret key can read every password and key in it. Keep the key in a password manager and out of the synced folder

Troubleshooting

MessageWhat to do
This key does not open fileThe secret key doesn't belong to this file. Paste it from your password manager, or copy it from the Secret Key group of an IDE where the file is linked
A secret key is 16, 24 or 32 characters longPart of the key is missing. Copy the whole key again
file is missingThe file was moved, renamed or deleted. See When the file moves or disappears
Error while reading credentials from the fileThe file is damaged or isn't a credentials file. Restore it from your sync client's history, or unlink it
Error while writing credentials to the fileThe folder is not writable or the sync client locked the file. Check the folder, then edit the entry again
"Cannot get password for" or "Cannot update stored password for" an accountThe IDE password safe refused the request. Check Settings › Appearance & Behavior › System Settings › Passwords in the IDE
"account not found" or "Password not specified" in Connections SettingsThe connection points at an account that was removed or has no password. Pick or add the account again

On this page