<commit_before>const Reconfig = require('reconfig')

module.exports = new Reconfig({
  pgdb: {
    user: 'postgres',
    database: 'authorization',
    password: '<PASSWORD>',
    host: 'localhost',
    port: 5432,
    max: 10,
    idleTimeoutMillis: 30000
  },
  hapi: {
    port: 8080,
    host: 'localhost'
  },
  logger: {
    pino: {
      level: 'info'
    }
  },
  security: {
    api: {
      servicekeys: {
        private: [
          '123456789'
        ]
      }
    }
  },
  authorization: {
    organizations: {
      defaultPolicies: [
        {
          version: '1',
          name: ':organizationId admin',
          org_id: ':organizationId',
          statements: {
            'Statement': [
              {
                'Effect': 'Allow',
                'Action': ['authorization:organization:read'],
                'Resource': [':organizationId:/authorization/organizations/*']
              },
              {
                'Effect': 'Allow',
                'Action': ['authorization:users:*'],
                'Resource': [':organizationId:/authorization/users*']
              },
              {
                'Effect': 'Allow',
                'Action': ['authorization:teams:*'],
                'Resource': [':organizationId:/authorization/teams*']
              },
              {
                'Effect': 'Allow',
                'Action': ['authorization:policies:list'],
                'Resource': [':organizationId:/authorization/policies']
              },
              {
                'Effect': 'Allow',
                'Action': ['authorization:policy:read'],
                'Resource': [':organizationId:/authorization/policies/*']
              }
            ]
          }
        }
      ]
    },
    teams: {
      defaultPolicies: [
        {
          version: '0.1',
          name: 'Default Team Admin for :teamId',
          org_id: ':organizationId',
          statements: {
            'Statement': [
              {
                'Effect': 'Allow',
                'Action': [
                  'authorization:teams:read',
                  'authorization:teams:update'
                ],
                'Resource': ['authorization/team/:teamId']
              },
              {
                'Effect': 'Allow',
                'Action': ['authorization:users:*'],
                'Resource': ['/authorization/user/:organizationId/:teamId/*']
              }
            ]
          }
        }
      ]
    }
  }
}, { envPrefix: 'LABS_AUTH_SERVICE' })
<commit_msg>default team policy version starts at 1<commit_after>const Reconfig = require('reconfig')

module.exports = new Reconfig({
  pgdb: {
    user: 'postgres',
    database: 'authorization',
    password: '<PASSWORD>',
    host: 'localhost',
    port: 5432,
    max: 10,
    idleTimeoutMillis: 30000
  },
  hapi: {
    port: 8080,
    host: 'localhost'
  },
  logger: {
    pino: {
      level: 'info'
    }
  },
  security: {
    api: {
      servicekeys: {
        private: [
          '123456789'
        ]
      }
    }
  },
  authorization: {
    organizations: {
      defaultPolicies: [
        {
          version: '1',
          name: ':organizationId admin',
          org_id: ':organizationId',
          statements: {
            'Statement': [
              {
                'Effect': 'Allow',
                'Action': ['authorization:organization:read'],
                'Resource': [':organizationId:/authorization/organizations/*']
              },
              {
                'Effect': 'Allow',
                'Action': ['authorization:users:*'],
                'Resource': [':organizationId:/authorization/users*']
              },
              {
                'Effect': 'Allow',
                'Action': ['authorization:teams:*'],
                'Resource': [':organizationId:/authorization/teams*']
              },
              {
                'Effect': 'Allow',
                'Action': ['authorization:policies:list'],
                'Resource': [':organizationId:/authorization/policies']
              },
              {
                'Effect': 'Allow',
                'Action': ['authorization:policy:read'],
                'Resource': [':organizationId:/authorization/policies/*']
              }
            ]
          }
        }
      ]
    },
    teams: {
      defaultPolicies: [
        {
          version: '1',
          name: 'Default Team Admin for :teamId',
          org_id: ':organizationId',
          statements: {
            'Statement': [
              {
                'Effect': 'Allow',
                'Action': [
                  'authorization:teams:read',
                  'authorization:teams:update'
                ],
                'Resource': ['authorization/team/:teamId']
              },
              {
                'Effect': 'Allow',
                'Action': ['authorization:users:*'],
                'Resource': ['/authorization/user/:organizationId/:teamId/*']
              }
            ]
          }
        }
      ]
    }
  }
}, { envPrefix: 'LABS_AUTH_SERVICE' })

{'fraction_non_alphanumeric': 0.14540816326530612, 'fraction_numerical': 0.010596546310832025, 'mean_word_length': 1.295945945945946, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5964603', 'n_tokens_mistral': 1450, 'n_tokens_neox': 1354, 'n_words': 218}