SecurityConfig class

Security-related configuration options for IPFS node

Constructors

SecurityConfig({@Deprecated('No listener terminates TLS via this config; enabling it only ' 'validates that the certificate files exist. This option is ignored.') bool enableTLS = false, @Deprecated('No listener terminates TLS via this config; see enableTLS. ' 'This option is ignored.') String? tlsCertificatePath, @Deprecated('No listener terminates TLS via this config; see enableTLS. ' 'This option is ignored.') String? tlsPrivateKeyPath, @Deprecated('Key rotation is not implemented; this flag is ignored.') bool enableKeyRotation = true, @Deprecated('Key rotation is not implemented; this flag is ignored.') Duration keyRotationInterval = const Duration(days: 30), @Deprecated('No live code path enforces authentication attempt limits; ' 'this option is ignored.') int maxAuthAttempts = 3, @Deprecated('No live code path enforces rate limiting; ' 'this option is ignored.') bool enableRateLimiting = true, @Deprecated('No live code path enforces rate limiting; ' 'this option is ignored.') int maxRequestsPerMinute = 100, int dhtDifficulty = 0, bool enableDenylist = false, String? denylistPath, String? denylistStoragePath, Duration denylistRefreshInterval = const Duration(hours: 1), @Deprecated('The denylist loader auto-detects the source format; ' 'this option is ignored.') bool denylistCompactFormat = true, String denylistDefaultAction = 'block'})
Creates a new SecurityConfig with default encryption and rotation settings.
const
SecurityConfig.fromJson(Map<String, dynamic> json)
Creates a SecurityConfig from a JSON map.
factory

Properties

denylistCompactFormat → bool
Whether the denylist source uses the BadBits-style compact format.
final
denylistDefaultAction → String
Default action for denylist hits: "block" or "log".
final
denylistPath → String?
Local file path or HTTP(S) URL to the denylist source.
final
denylistRefreshInterval → Duration
Interval between automatic denylist refreshes.
final
denylistStoragePath → String?
Optional local path for a persistent cached copy of the denylist.
final
dhtDifficulty → int
SEC-005: Static PoW difficulty for DHT Sybil protection (number of zero bits)
final
enableDenylist → bool
Whether the operator-controlled content denylist is enabled.
final
enableKeyRotation → bool
Whether to enable key rotation
final
enableRateLimiting → bool
Whether to enable request rate limiting
final
enableTLS → bool
Whether to enable TLS for secure communication
final
hashCode → int
The hash code for this object.
no setterinherited
keyRotationInterval → Duration
Key rotation interval
final
maxAuthAttempts → int
Maximum number of authentication attempts
final
maxRequestsPerMinute → int
Maximum requests per minute
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
tlsCertificatePath → String?
The path to the TLS certificate file
final
tlsPrivateKeyPath → String?
The path to the TLS private key file
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
Converts this configuration to a JSON map.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited