Authentication

The file secret.json defines the authentication towards the foreign database and is one of:

  • anonymous (no authentication),

  • basic authentication,

  • token-based authentication,

  • private-key-based.

Some databases support multiple variants, for example the DuckDB driver supports anonymous authentication for local files, and token-based authentication for Motherduck.

Anonymous

An anonymous secret is always the same:

{
  "type": "anonymous"
}

Basic authentication

Basic authentication is used for username and password principals:

{
  "type": "basic",
  "username": "Jon",
  "password": "Doe"
}

Token based authentication

{
  "type": "token",
  "value": "wurstsalat"
}

Key-file-based authentication

The file defined here must be reachable and readable from within the Neo4j process. The path is passed "as is" to the JDBC being used.

{
  "type": "keyfile",
  "username": "Perry",
  "filename": "/my/key.p8"
}

The additional property password can be used if the key file is password protected and the underlying driver does support such an arrangement. The password is passed to the JDBC driver used.

Arbitrary file-based authentication

Providers such as Big Query use a single file for authentication. This can be utilized with a provider supporting such secrets:

{
  "type": "configfile",
  "filename": "my/my-config.json"
}