import re

SECRET_LENGTH = 40  # Hexadecimal

DEFAULT_ACCESS_TTL = 15 * 60  # 15 minutes in seconds
MINIMUM_ACCESS_TTL = 1  # 1 second
MAXIMUM_ACCESS_TTL = 3600  # 1 hour in seconds

DEFAULT_REFRESH_TTL = 24 * 60 * 60  # 24 hours in seconds
MINIMUM_REFRESH_TTL = 0  # 0 second
MAXIMUM_REFRESH_TTL = 45 * 24 * 60 * 60  # 45 days in seconds

SENSITIVE_PHRASES = [
  re.compile(r"^pwd"),
  re.compile(r"^pass"),
  re.compile(r"secret"),
  re.compile(r"token$"),
  re.compile(r"^private"),
  re.compile(r"api[_-]key$"),
  re.compile(r"authorization"),
]
