<commit_before>'use strict'; // eslint-disable-line strict
const crypto = require('crypto');

// The min value here is to manage further backward compat if we
// need it
const iamSecurityTokenSizeMin = 128;
const iamSecurityTokenSizeMax = 128;
// Security token is an hex string (no real format from amazon)
const iamSecurityTokenPattern =
    new RegExp(`^[a-f0-9]{${iamSecurityTokenSizeMin},` +
        `${iamSecurityTokenSizeMax}}$`);

module.exports = {
    // info about the iam security token
    iamSecurityToken: {
        min: iamSecurityTokenSizeMin,
        max: iamSecurityTokenSizeMax,
        pattern: iamSecurityTokenPattern,
    },
    // PublicId is used as the canonicalID for a request that contains
    // no authentication information.  Requestor can access
    // only public resources
    publicId: 'http://acs.amazonaws.com/groups/global/AllUsers',
    zenkoServiceAccount: 'http://acs.zenko.io/accounts/service',
    metadataFileNamespace: '/MDFile',
    dataFileURL: '/DataFile',
    passthroughFileURL: '/PassthroughFile',
    // AWS states max size for user-defined metadata
    // (x-amz-meta- headers) is 2 KB:
    // http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPUT.html
    // In testing, AWS seems to allow up to 88 more bytes,
    // so we do the same.
    maximumMetaHeadersSize: 2136,
    emptyFileMd5: 'd41d8cd98f00b204e9800998ecf8427e',
    // Version 2 changes the format of the data location property
    // Version 3 adds the dataStoreName attribute
    // Version 4 add the Creation-Time and Content-Language attributes,
    //     and add support for x-ms-meta-* headers in UserMetadata
    // Version 5 adds the azureInfo structure<commit_msg>improvement: ARSN-43 support encrypted STS tokens<commit_after>'use strict'; // eslint-disable-line strict
const crypto = require('crypto');

// The min value here is to manage further backward compat if we
// need it
// Default value
const vaultGeneratedIamSecurityTokenSizeMin = 128;
// Safe to assume that a typical token size is less than 8192 bytes
const vaultGeneratedIamSecurityTokenSizeMax = 8192;
// Base-64
const vaultGeneratedIamSecurityTokenPattern = /^[A-Za-z0-9/+=]*$/;

module.exports = {
    // info about the iam security token
    iamSecurityToken: {
        min: vaultGeneratedIamSecurityTokenSizeMin,
        max: vaultGeneratedIamSecurityTokenSizeMax,
        pattern: vaultGeneratedIamSecurityTokenPattern,
    },
    // PublicId is used as the canonicalID for a request that contains
    // no authentication information.  Requestor can access
    // only public resources
    publicId: 'http://acs.amazonaws.com/groups/global/AllUsers',
    zenkoServiceAccount: 'http://acs.zenko.io/accounts/service',
    metadataFileNamespace: '/MDFile',
    dataFileURL: '/DataFile',
    passthroughFileURL: '/PassthroughFile',
    // AWS states max size for user-defined metadata
    // (x-amz-meta- headers) is 2 KB:
    // http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPUT.html
    // In testing, AWS seems to allow up to 88 more bytes,
    // so we do the same.
    maximumMetaHeadersSize: 2136,
    emptyFileMd5: 'd41d8cd98f00b204e9800998ecf8427e',
    // Version 2 changes the format of the data location property
    // Version 3 adds the dataStoreName attribute
    // Version 4 add the Creation-Time and Content-Language attributes,
    //     and add support for x-ms-meta-* headers in UserMetadata
    // Version 5 adds the azureInfo structure
{'fraction_non_alphanumeric': 0.09441565918249856, 'fraction_numerical': 0.02677029360967185, 'mean_word_length': 3.3329177057356607, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '1018991', 'n_tokens_mistral': 1067, 'n_tokens_neox': 990, 'n_words': 323}