SecurityConfig class
Security-related configuration options for IPFS node
Constructors
- SecurityConfig({bool enableTLS = false, String? tlsCertificatePath, String? tlsPrivateKeyPath, bool enableKeyRotation = true, Duration keyRotationInterval = const Duration(days: 30), int maxAuthAttempts = 3, bool enableRateLimiting = true, int maxRequestsPerMinute = 100, int dhtDifficulty = 0, bool enableDenylist = false, String? denylistPath, String? denylistStoragePath, Duration denylistRefreshInterval = const Duration(hours: 1), 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