security: rate limit admin authentication
This commit is contained in:
@@ -143,6 +143,13 @@ class SubmissionAttempt(Base):
|
||||
catch_report: Mapped[CatchReport | None] = relationship()
|
||||
|
||||
|
||||
class AdminAuthAttempt(Base):
|
||||
__tablename__ = "admin_auth_attempt"
|
||||
id: Mapped[uuid.UUID] = mapped_column(primary_key=True, default=uuid.uuid4)
|
||||
client_hash: Mapped[str] = mapped_column(String(64), index=True)
|
||||
created_at: Mapped[datetime] = mapped_column(DateTime(timezone=True), index=True)
|
||||
|
||||
|
||||
class DataSource(Base):
|
||||
__tablename__ = "data_source"
|
||||
key: Mapped[str] = mapped_column(String(50), primary_key=True)
|
||||
|
||||
Reference in New Issue
Block a user