Configure a connector with a marking
The Jira, Confluence and GitLab connectors and --classification are on main. A managed
Badger session cannot load a connector yet; this guide runs one as a standalone MCP server, the
way its tests do.
Build
Each connector is a static binary in the testifysec/connectors Go module, which has no
third-party dependencies:
cd testifysec/connectors
mkdir -p bin
CGO_ENABLED=0 go build -o bin/jira ./jira # likewise -o bin/confluence ./confluence, -o bin/gitlab ./gitlab
go test ./...
Settings
Every connector takes the same core settings, as a flag or an environment variable. A flag wins over the variable.
| Flag | Variable | Meaning |
|---|---|---|
--base-url | BADGER_CONNECTOR_BASE_URL | The one service the connector may reach. HTTPS only. |
--token-file | BADGER_CONNECTOR_TOKEN_FILE | File holding the developer's short-lived token. Required. Read on every request, so it may appear after start. |
--ca-file | BADGER_CONNECTOR_CA_FILE | Enclave CA roots for the service's certificate. |
--enable-writes | BADGER_CONNECTOR_ENABLE_WRITES=1 | Register the write tools. Off by default. |
--classification | BADGER_CONNECTOR_CLASSIFICATION | The connector's one marking. Required; the connector exits with status 2 if it is missing or does not parse. |
The GitLab connector also takes --auth (BADGER_CONNECTOR_GITLAB_AUTH): private-token
(the default) or bearer.
Choose the marking
Set --classification to the highest marking the service is accredited to hold, in banner form:
./bin/jira --base-url https://jira.example.invalid/rest/api/2 \
--token-file /run/badger/jira.token \
--ca-file /etc/badger/enclave-ca.pem \
--classification "SECRET//REL TO USA, FVEY"
Every result the connector returns carries that marking. A connector has one classification; nothing in an issue, page, label or file changes it. If parts of a service hold data at different levels, set the marking to the highest of them. See classification markings.
Check what it exposes
The connector speaks MCP on standard input and output. List its tools by sending initialize and
tools/list:
printf '%s\n' \
'{"jsonrpc":"2.0","id":1,"method":"initialize","params":{}}' \
'{"jsonrpc":"2.0","id":2,"method":"tools/list"}' \
| ./bin/jira --base-url https://jira.example.invalid/rest/api/2 --token-file /dev/null \
--classification "SECRET//REL TO USA, FVEY"
Without --enable-writes no write tool appears in the list, and calling one by name returns
"unknown tool". Add the flag only for a service where the agent should write, and expect each write
to go through the session's permission prompt once admission through the profile exists.
Credential
The connector sends the token from --token-file as the developer, as a bearer token or, for
GitLab, a private token. Use a personal access token with the narrowest scope the service allows.
In the design the session broker writes this file per user; there is no shared service account.
Reference generated from the product documentation. Match commands and support details to your installed release.