Skip to content

Commit

Permalink
Update Auth0 and Okta (#94)
Browse files Browse the repository at this point in the history
* Update Auth0 and Okta

* Minor refactor
  • Loading branch information
kkuzmin authored Mar 27, 2020
1 parent 17ec584 commit a5eedb8
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 8 deletions.
1 change: 1 addition & 0 deletions collectors/auth0/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package-lock=false
6 changes: 5 additions & 1 deletion collectors/auth0/auth0_collector.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const request = require('request');
const parse = require('@alertlogic/al-collector-js').Parse;
const ManagementClient = require('auth0').ManagementClient;
const PawsCollector = require('@alertlogic/paws-collector').PawsCollector;

const packageJson = require('./package.json');

const typeIdPaths = [
{ path: ['type'] }
Expand All @@ -29,6 +29,10 @@ const HOSTNAME_REGEXP = /^[htps]*:\/\/|\/$/gi;

class Auth0Collector extends PawsCollector {

constructor(context, creds){
super(context, creds, packageJson.version);
}

pawsInitCollectionState(event, callback) {
const initialState = {
since: process.env.paws_collection_start_ts ? process.env.paws_collection_start_ts : moment().subtract(5, 'minutes').toISOString(),
Expand Down
4 changes: 2 additions & 2 deletions collectors/auth0/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "auth0-collector",
"version": "1.1.2",
"version": "1.1.3",
"description": "Alert Logic AWS based Auth0 Log Collector extension",
"repository": {},
"private": true,
Expand All @@ -21,7 +21,7 @@
"dependencies": {
"auth0": "2.20.0",
"@alertlogic/al-collector-js": "^1.4.5",
"@alertlogic/paws-collector": "^1.1.6",
"@alertlogic/paws-collector": "^1.1.7",
"async": "3.1.0",
"debug": "4.1.1",
"moment": "2.24.0"
Expand Down
1 change: 1 addition & 0 deletions collectors/okta/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package-lock=false
8 changes: 5 additions & 3 deletions collectors/okta/okta_collector.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@

const moment = require('moment');
const okta = require('@okta/okta-sdk-nodejs');
const healthChecks = require('./health_checks');
const parse = require('@alertlogic/al-collector-js').Parse;
const PawsCollector = require('@alertlogic/paws-collector').PawsCollector;
const calcNextCollectionInterval = require('@alertlogic/paws-collector').calcNextCollectionInterval;

const packageJson = require('./package.json');
const healthChecks = require('./health_checks');

const THROTTLING_ERROR_REGEXP = /rateLimit/g;

const typeIdPaths = [
Expand All @@ -35,9 +37,9 @@ const sensitiveFields = [

class OktaCollector extends PawsCollector {

constructor(context, {aimsCreds, pawsCreds}){
constructor(context, creds){
super(context,
{aimsCreds, pawsCreds},
creds, packageJson.version,
[healthChecks.oktaTokenHealthCheck], []);
}

Expand Down
4 changes: 2 additions & 2 deletions collectors/okta/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "okta-collector",
"version": "1.1.3",
"version": "1.1.4",
"description": "Alert Logic AWS based Okta Log Collector",
"repository": {},
"private": true,
Expand All @@ -22,7 +22,7 @@
"dependencies": {
"@okta/okta-sdk-nodejs": "3.1.0",
"@alertlogic/al-collector-js": "^1.4.5",
"@alertlogic/paws-collector": "^1.1.6",
"@alertlogic/paws-collector": "^1.1.7",
"async": "3.1.0",
"debug": "4.1.1",
"moment": "2.24.0"
Expand Down
1 change: 1 addition & 0 deletions collectors/template/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package-lock=false
1 change: 1 addition & 0 deletions collectors/template/collector.js.template
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
const moment = require('moment');
const PawsCollector = require('@alertlogic/paws-collector').PawsCollector;
const parse = require('@alertlogic/al-collector-js').Parse;
const packageJson = require('./package.json');


const typeIdPaths = [
Expand Down

0 comments on commit a5eedb8

Please sign in to comment.