<?php

use Illuminate\Support\Str;

return [
    /**
     * You're probably wondering what the functional difference between these two variables is...
     * - client_login_attempts - Serves to block excessive attempts which may be a part of a bruteforce or dictionary / email table attack.
     * - account_login_attempts - Serves to block excessive attempts against an individual account where an attack may be more targetted.
     */
    'client_login_attempts' => env('CLIENT_LOGIN_ATTEMPTS', 10),
    'account_login_attempts' => env('ACCOUNT_LOGIN_ATTEMPTS', 10),
    'account_lockout_time' => env('ACCOUNT_LOCKOUT_TIME', 5),

    /**
     * Multi-factor authentication.
     * - mfa_bypass_blocks - Comma separated CIDR blocks considered internal / corporate VPN; logins from these
     *   skip the TOTP challenge. Keep this to internal ranges - Public ranges matched via forwarded headers
     *   are spoofable by anyone who learns them. Ranges must be wider than a single host (/31 or wider) -
     *   Bare IPs and /32 entries never match.
     * - mfa_totp_window - 30 second steps of clock drift tolerated either side of now.
     * - mfa_encryption_secret - Plain-text secret from which the at-rest key for TOTP secrets is
     *   derived (deliberately NOT the application key, so APP_KEY rotation never invalidates
     *   enrollments). Use a long memorable passphrase; changing it invalidates every enrollment.
     */
    'mfa_bypass_blocks' => array_filter(array_map('trim', explode(',', env('MFA_BYPASS_BLOCKS', '')))),
    'mfa_totp_window' => env('MFA_TOTP_WINDOW', 1),
    'mfa_encryption_secret' => env('MFA_ENCRYPTION_SECRET', null),
    /**
     * Block of information specific for GSL.
     */
    'gsl_asn' => env('GSL_ASN', null),

    /**
     * RaDB information
     */
    'radb_username' => env('RADB_USERNAME', ' '),
    'radb_password' => env('RADB_PASSWORD', ' '),
    'radb_endpoint' => env('RADB_ENDPOINT', 'https://api.radb.net/api'),
    'radb_crypt' => env('RADB_CRYPT', ' '),
    'radb_mail_from' => env('RADB_MAILFROM', ' '),

    /**
     * APNIC information
     */

     /**
      * Database seeding constants so we're not doing lookups constantly.
      */

      'group_admin_id' => env('GROUP_ADMIN_ID', 1),
      'group_organisation_manager_id' => env('GROUP_ORGANISATION_MANAGER_ID', 2),
      'group_organisation_user_id' => env('GROUP_ORGANISATION_USER_ID', 3),
      'group_user_id' => env('GROUP_USER_ID', 4),
      'group_manager_id' => env('GROUP_MANAGER_ID', 5),

      'development_email_direct' => env('DEVELOPMENT_EMAIL_REDIRECT', ''),

      /**
       * Information for message security
       */
      'obsfucation' => [
        'websockets'  => env('OBSFUCATION_WEBSOCKETS', false),
        'responses'   => env('OBSFUCATION_RESPONSES', false),
        'salt'        => env('OBSFUCATION_SALT', ''),
        'noise'       => env('OBSFUCATION_NOISE', 8),
        'passes'      => env('OBSFUCATION_PASSES', 1), 
        'flip'        => env('OBSFUCATION_FLIP', false)
      ]
];
