SecurityConfig constructor

const SecurityConfig({
  1. @Deprecated('No listener terminates TLS via this config; enabling it only ' 'validates that the certificate files exist. This option is ignored.') bool enableTLS = false,
  2. @Deprecated('No listener terminates TLS via this config; see enableTLS. ' 'This option is ignored.') String? tlsCertificatePath,
  3. @Deprecated('No listener terminates TLS via this config; see enableTLS. ' 'This option is ignored.') String? tlsPrivateKeyPath,
  4. @Deprecated('Key rotation is not implemented; this flag is ignored.') bool enableKeyRotation = true,
  5. @Deprecated('Key rotation is not implemented; this flag is ignored.') Duration keyRotationInterval = const Duration(days: 30),
  6. @Deprecated('No live code path enforces authentication attempt limits; ' 'this option is ignored.') int maxAuthAttempts = 3,
  7. @Deprecated('No live code path enforces rate limiting; ' 'this option is ignored.') bool enableRateLimiting = true,
  8. @Deprecated('No live code path enforces rate limiting; ' 'this option is ignored.') int maxRequestsPerMinute = 100,
  9. int dhtDifficulty = 0,
  10. bool enableDenylist = false,
  11. String? denylistPath,
  12. String? denylistStoragePath,
  13. Duration denylistRefreshInterval = const Duration(hours: 1),
  14. @Deprecated('The denylist loader auto-detects the source format; ' 'this option is ignored.') bool denylistCompactFormat = true,
  15. String denylistDefaultAction = 'block',
})

Creates a new SecurityConfig with default encryption and rotation settings.

Implementation

const SecurityConfig({
  @Deprecated(
    'No listener terminates TLS via this config; enabling it only '
    'validates that the certificate files exist. This option is ignored.',
  )
  this.enableTLS = false,
  @Deprecated(
    'No listener terminates TLS via this config; see enableTLS. '
    'This option is ignored.',
  )
  this.tlsCertificatePath,
  @Deprecated(
    'No listener terminates TLS via this config; see enableTLS. '
    'This option is ignored.',
  )
  this.tlsPrivateKeyPath,
  @Deprecated('Key rotation is not implemented; this flag is ignored.')
  this.enableKeyRotation = true,
  @Deprecated('Key rotation is not implemented; this flag is ignored.')
  this.keyRotationInterval = const Duration(days: 30),
  @Deprecated(
    'No live code path enforces authentication attempt limits; '
    'this option is ignored.',
  )
  this.maxAuthAttempts = 3,
  @Deprecated(
    'No live code path enforces rate limiting; '
    'this option is ignored.',
  )
  this.enableRateLimiting = true,
  @Deprecated(
    'No live code path enforces rate limiting; '
    'this option is ignored.',
  )
  this.maxRequestsPerMinute = 100,
  this.dhtDifficulty = 0, // SEC-005: Default disabled
  this.enableDenylist = false,
  this.denylistPath,
  this.denylistStoragePath,
  this.denylistRefreshInterval = const Duration(hours: 1),
  @Deprecated(
    'The denylist loader auto-detects the source format; '
    'this option is ignored.',
  )
  this.denylistCompactFormat = true,
  this.denylistDefaultAction = 'block',
});