Skip to main content

@webda/coreReadme | API


Class: CryptoServiceParameters

Interface to specify the Service parameters

Extends

Constructors

new CryptoServiceParameters(params)

new CryptoServiceParameters(params): CryptoServiceParameters

Parameters

params: any

Returns

CryptoServiceParameters

Overrides

ServiceParameters.constructor

Source

packages/core/src/services/cryptoservice.ts:202

Properties

asymetricOptions?

asymetricOptions?: Object

Options for asymetric generation

Type declaration

modulusLength?

modulusLength?: number

Default
2048
namedCurve?

namedCurve?: string

Only if asymetricType "ec"

privateKeyEncoding?

privateKeyEncoding?: Object

privateKeyEncoding.cipher?

privateKeyEncoding.cipher?: string

privateKeyEncoding.format?

privateKeyEncoding.format?: "pem"

privateKeyEncoding.passphrase?

privateKeyEncoding.passphrase?: string

privateKeyEncoding.type?

privateKeyEncoding.type?: "pkcs1" | "pkcs8" | "sec1"

https://nodejs.org/docs/latest-v14.x/api/crypto.html#crypto_keyobject_export_options

Default
pkcs8
publicKeyEncoding?

publicKeyEncoding?: Object

publicKeyEncoding.format?

publicKeyEncoding.format?: "pem"

publicKeyEncoding.type?

publicKeyEncoding.type?: "spki" | "pkcs1"

Default
spki

Source

packages/core/src/services/cryptoservice.ts:162


asymetricType

asymetricType: "rsa" | "dsa" | "ec" | "ed25519" | "ed448" | "x25519" | "x448" | "dh"

Type of asymetric key

https://nodejs.org/api/crypto.html#cryptogeneratekeypairsynctype-options https://nodejs.org/docs/latest-v14.x/api/crypto.html#crypto_crypto_generatekeypairsync_type_options

Source

packages/core/src/services/cryptoservice.ts:158


autoCreate?

autoCreate?: boolean

Create first set of key if does not exist

Source

packages/core/src/services/cryptoservice.ts:144


autoRotate?

autoRotate?: number

Try to rotate keys when they expire in days

Source

packages/core/src/services/cryptoservice.ts:140


jwt?

jwt?: JWTOptions

Default JWT options

Source

packages/core/src/services/cryptoservice.ts:200


keyActiveLifespan

keyActiveLifespan: number

Number of hours a key should be used for encryption

if auto-rotate is not set this

Source

packages/core/src/services/cryptoservice.ts:132


keyLifespan

keyLifespan: number

Number of hours allowed to decrypt data encrypted with this key

Source

packages/core/src/services/cryptoservice.ts:136


openapi?

openapi?: OpenAPIWebdaDefinition

OpenAPI override

Schema Ignore

Inherited from

ServiceParameters.openapi

Source

packages/core/src/services/service.ts:260


symetricCipher?

symetricCipher?: string

Default

"aes-256-ctr"

Source

packages/core/src/services/cryptoservice.ts:196


symetricKeyLength?

symetricKeyLength?: number

Default

256

Source

packages/core/src/services/cryptoservice.ts:192


type

type: string

Type of the service

Inherited from

ServiceParameters.type

Source

packages/core/src/services/service.ts:251


url?

url?: string

To expose JWKS

See

https://datatracker.ietf.org/doc/html/rfc7517

Overrides

ServiceParameters.url

Source

packages/core/src/services/cryptoservice.ts:150