mirror of
https://github.com/bitwarden/server
synced 2026-02-26 09:23:28 +00:00
* Importing test fixtures from test repo into the Seeder * Needed to ensure that we assigned permission to collections; not just made them.
220 lines
6.4 KiB
JSON
220 lines
6.4 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "cipher.schema.json",
|
|
"title": "Bitwarden Cipher Seed File",
|
|
"description": "Defines vault items (logins, cards, identities) for the Bitwarden Seeder.",
|
|
"type": "object",
|
|
"required": ["items"],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"$schema": {
|
|
"type": "string"
|
|
},
|
|
"items": {
|
|
"type": "array",
|
|
"minItems": 1,
|
|
"items": {
|
|
"$ref": "#/$defs/item"
|
|
}
|
|
}
|
|
},
|
|
"$defs": {
|
|
"item": {
|
|
"type": "object",
|
|
"required": ["type", "name"],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": ["login", "card", "identity", "secureNote", "sshKey"]
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"notes": {
|
|
"type": "string"
|
|
},
|
|
"login": {
|
|
"$ref": "#/$defs/login"
|
|
},
|
|
"card": {
|
|
"$ref": "#/$defs/card"
|
|
},
|
|
"identity": {
|
|
"$ref": "#/$defs/identity"
|
|
},
|
|
"sshKey": {
|
|
"$ref": "#/$defs/sshKey"
|
|
},
|
|
"reprompt": {
|
|
"type": "integer",
|
|
"enum": [0, 1],
|
|
"default": 0,
|
|
"description": "Master password re-prompt. 0=None, 1=Password."
|
|
},
|
|
"favorite": {
|
|
"type": "boolean",
|
|
"default": false,
|
|
"description": "Whether the item is marked as a favorite."
|
|
},
|
|
"fields": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/$defs/field"
|
|
}
|
|
},
|
|
"passwordHistory": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/$defs/passwordHistory"
|
|
}
|
|
}
|
|
},
|
|
"allOf": [
|
|
{
|
|
"if": { "properties": { "type": { "const": "login" } } },
|
|
"then": { "required": ["login"] }
|
|
},
|
|
{
|
|
"if": { "properties": { "type": { "const": "card" } } },
|
|
"then": { "required": ["card"] }
|
|
},
|
|
{
|
|
"if": { "properties": { "type": { "const": "identity" } } },
|
|
"then": { "required": ["identity"] }
|
|
},
|
|
{
|
|
"if": { "properties": { "type": { "const": "sshKey" } } },
|
|
"then": { "required": ["sshKey"] }
|
|
}
|
|
]
|
|
},
|
|
"login": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"username": { "type": "string" },
|
|
"password": { "type": "string" },
|
|
"totp": { "type": "string" },
|
|
"passwordRevisionDate": { "type": "string", "description": "ISO date when the password was last changed." },
|
|
"autofillOnPageLoad": { "type": "boolean", "description": "Auto-populate credential on page load." },
|
|
"uris": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/$defs/loginUri"
|
|
}
|
|
},
|
|
"fido2Credentials": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/$defs/fido2Credential"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"loginUri": {
|
|
"type": "object",
|
|
"required": ["uri"],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"uri": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"match": {
|
|
"type": "string",
|
|
"enum": ["domain", "host", "startsWith", "exact", "regex", "never"],
|
|
"default": "domain"
|
|
}
|
|
}
|
|
},
|
|
"card": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"cardholderName": { "type": "string" },
|
|
"brand": { "type": "string" },
|
|
"number": { "type": "string" },
|
|
"expMonth": { "type": "string" },
|
|
"expYear": { "type": "string" },
|
|
"code": { "type": "string" }
|
|
}
|
|
},
|
|
"identity": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"firstName": { "type": "string" },
|
|
"middleName": { "type": "string" },
|
|
"lastName": { "type": "string" },
|
|
"address1": { "type": "string" },
|
|
"address2": { "type": "string" },
|
|
"address3": { "type": "string" },
|
|
"city": { "type": "string" },
|
|
"state": { "type": "string" },
|
|
"postalCode": { "type": "string" },
|
|
"country": { "type": "string" },
|
|
"company": { "type": "string" },
|
|
"email": { "type": "string" },
|
|
"phone": { "type": "string" },
|
|
"ssn": { "type": "string" },
|
|
"username": { "type": "string" },
|
|
"passportNumber": { "type": "string" },
|
|
"licenseNumber": { "type": "string" }
|
|
}
|
|
},
|
|
"field": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"name": { "type": "string" },
|
|
"value": { "type": "string" },
|
|
"type": {
|
|
"type": "string",
|
|
"enum": ["text", "hidden", "boolean", "linked"],
|
|
"default": "text"
|
|
},
|
|
"linkedId": {
|
|
"type": "integer",
|
|
"description": "Links to cipher property. Only valid when type='linked'. Login: Username=100, Password=101. Card: CardholderName=300, ExpMonth=301, ExpYear=302, Code=303, Brand=304, Number=305. Identity: Title=400 through FullName=418."
|
|
}
|
|
}
|
|
},
|
|
"sshKey": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"privateKey": { "type": "string" },
|
|
"publicKey": { "type": "string" },
|
|
"keyFingerprint": { "type": "string" }
|
|
}
|
|
},
|
|
"passwordHistory": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"password": { "type": "string" },
|
|
"lastUsedDate": { "type": "string", "description": "ISO date when password was last used." }
|
|
}
|
|
},
|
|
"fido2Credential": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"credentialId": { "type": "string" },
|
|
"keyType": { "type": "string", "default": "public-key" },
|
|
"keyAlgorithm": { "type": "string", "default": "ECDSA" },
|
|
"keyCurve": { "type": "string", "default": "P-256" },
|
|
"keyValue": { "type": "string" },
|
|
"rpId": { "type": "string" },
|
|
"rpName": { "type": "string" },
|
|
"userHandle": { "type": "string" },
|
|
"userName": { "type": "string" },
|
|
"userDisplayName": { "type": "string" },
|
|
"counter": { "type": "integer" },
|
|
"discoverable": { "type": "boolean", "default": false }
|
|
}
|
|
}
|
|
}
|
|
}
|