Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/splunk direct delivery #2278

Open
wants to merge 91 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 70 commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
60cd162
Store product config
devkiran Nov 17, 2023
cf9a051
Handle Product not found.
devkiran Nov 20, 2023
7cae843
Product id is required
devkiran Nov 20, 2023
fc0a32d
Cleanup
devkiran Nov 20, 2023
8be2e20
Merge branch 'main' into feat/product-config
devkiran Nov 21, 2023
f23eb97
Refactor API route validation in middleware.ts
devkiran Nov 21, 2023
837be17
Show friendly product name instead of id
devkiran Nov 23, 2023
eda43bb
Refactor product fetching
devkiran Nov 23, 2023
add5398
Merge branch 'main' into feat/product-config
Nov 23, 2023
533c744
Audit Logs for Jackson + SaaS App
devkiran Nov 23, 2023
1867c6e
Cleanup type
devkiran Nov 23, 2023
aa9562a
Add description to reportEvent function
devkiran Nov 24, 2023
85050d5
Remove unused import
devkiran Nov 24, 2023
141d91d
Merge branch 'main' into feat/audit-logs-saas-app
Nov 24, 2023
a06c76a
Fix error handling in reportEvent function
devkiran Nov 24, 2023
ae1ee83
Merge branch 'feat/audit-logs-saas-app' of https://github.com/boxyhq/…
devkiran Nov 24, 2023
303dc81
Merge branch 'main' into feat/audit-logs-saas-app
Nov 27, 2023
e086711
Add target and tenant fields
devkiran Nov 27, 2023
681cf95
Error handling
devkiran Nov 27, 2023
d2cd190
Event reporting for
devkiran Nov 28, 2023
f3bdf88
Merge branch 'main' into feat/audit-logs-saas-app
Nov 28, 2023
70d7a21
Merge branch 'feat/audit-logs-saas-app' of https://github.com/boxyhq/…
devkiran Nov 28, 2023
0097cfe
Add retraced event to dsync
devkiran Nov 28, 2023
1a62364
Add retraced event tracking for setup link
devkiran Nov 28, 2023
6228d71
Add retraced event logging for federated SAML API
devkiran Nov 28, 2023
b88ca2e
Fix track events for API events
devkiran Nov 28, 2023
e498c9a
Add branding update event to retraced
devkiran Nov 28, 2023
5d1c5cd
Fix optional parameters in reportAdminPortalEvent
devkiran Nov 28, 2023
116ad0d
Fix import statement and update event CRUD
devkiran Nov 29, 2023
0b0b23e
Add FederatedSAMLProfile to samlResponse method
devkiran Nov 30, 2023
726b7e7
Merge branch 'main' into feat/audit-logs-saas-app
devkiran Nov 30, 2023
71c6662
Update package-lock.json
devkiran Nov 30, 2023
ddb51c1
Remove console.log
devkiran Nov 30, 2023
48e7314
Merge branch 'main' into feat/audit-logs-saas-app
devkiran Jan 3, 2024
bb119bb
Add audit log teams configuration
devkiran Jan 3, 2024
de01aed
Merge branch 'main' into feat/audit-logs-saas-app
devkiran Jan 4, 2024
93e1199
Fix the build
devkiran Jan 4, 2024
e0c7592
Merge branch 'main' into feat/audit-logs-saas-app
devkiran Jan 4, 2024
a79cf7c
Remove console.log
devkiran Jan 4, 2024
8b2ce8c
added apis, controller, store for security logs config
ukrocks007 Jan 25, 2024
4b11c48
added pages and made the flow working
ukrocks007 Jan 29, 2024
b67f9f3
Refactor import statements in security-logs/index.ts
ukrocks007 Jan 29, 2024
a05f9b1
added package configs and sinks
ukrocks007 Feb 2, 2024
4c23cf8
security-sinks package related changes
ukrocks007 Feb 6, 2024
eb723cb
Update npm install and publish for security sinks
ukrocks007 Feb 7, 2024
0dbacae
Update package.json paths for distribution files
ukrocks007 Feb 9, 2024
f8427d0
Merge branch 'main' into feature/splunk-direct-delivery
ukrocks007 Feb 9, 2024
09879bb
Add retry logic for sending events to Splunk HEC
ukrocks007 Feb 9, 2024
39ad0e4
Update tsconfig.json with downlevelIteration and ts-node configuration
ukrocks007 Feb 9, 2024
7b94614
Update package name in package-lock.json
ukrocks007 Feb 9, 2024
ef2aebf
Remove unused variable in OAuthController
ukrocks007 Feb 9, 2024
5b9d91b
Add prepare:security-sinks script to package.json
ukrocks007 Feb 9, 2024
18aab06
Update package.json build and main paths
ukrocks007 Feb 9, 2024
84b9b56
Merge branch main in feature/splunk-direct-delivery
ukrocks007 Mar 18, 2024
9f16bee
Merge branch 'main' into feature/splunk-direct-delivery
ukrocks007 Mar 18, 2024
b66da67
Refactor security logs configuration page to use internal UI Table co…
ukrocks007 Mar 18, 2024
7826824
format
ukrocks007 Mar 18, 2024
be0db63
updated package-lock
deepakprabhakara Mar 18, 2024
828e5b2
fixed merge issue related to oauth.ts
deepakprabhakara Mar 18, 2024
4688dfd
locale strings fix
deepakprabhakara Mar 18, 2024
30e5003
fixed locale-check
deepakprabhakara Mar 18, 2024
a195106
fixed docker build
deepakprabhakara Mar 18, 2024
884995b
Merge branch 'main' into feature/splunk-direct-delivery
ukrocks007 Mar 19, 2024
62f9fcf
Update import paths for product and security logs config APIs
ukrocks007 Mar 19, 2024
4b87293
Merge branch 'main' into feature/splunk-direct-delivery
ukrocks007 Mar 28, 2024
184851c
Update dependencies and cleanup duplicate code
ukrocks007 Mar 28, 2024
cb23941
Refactor UI components and update dependencies
ukrocks007 Mar 28, 2024
7746cd4
Add verdaccio.sh script for publishing package to local registry
ukrocks007 Mar 28, 2024
bf25ead
Update axios dependency to version 1.6.8
ukrocks007 Mar 29, 2024
ffa506c
Add API key creation and deletion functionality
ukrocks007 Apr 1, 2024
d499887
Merge branch 'main' into feature/splunk-direct-delivery
ukrocks007 Apr 1, 2024
babfcbb
Update package.json to use src/index.ts instead of dist/index.js for …
ukrocks007 Apr 1, 2024
aeb2b44
Merge branch 'main' into feature/splunk-direct-delivery
ukrocks007 Apr 2, 2024
1f51c3e
Update dependencies and package.json configuration
ukrocks007 Apr 2, 2024
43a0d55
Refactor code to use API key for admin portal routes and handle missi…
ukrocks007 Apr 2, 2024
508eec5
Merge branch 'release' into feature/splunk-direct-delivery
deepakprabhakara Apr 2, 2024
5882bb8
Refactor security logs configuration components and types
ukrocks007 Apr 9, 2024
4bc8d3d
Refactor security logs configuration components and types
ukrocks007 Apr 9, 2024
8c0c794
Update exception list in check-locale.js
ukrocks007 Apr 9, 2024
e2eaff0
Update security logs configuration imports
ukrocks007 Apr 9, 2024
0e87280
Merge branch 'main' into feature/splunk-direct-delivery
ukrocks007 Apr 9, 2024
418e410
Refactor security logs configuration imports and components
ukrocks007 Apr 9, 2024
e8b00ac
Refactor security logs configuration imports and components
ukrocks007 Apr 10, 2024
511bc19
Fix error handling in SecurityLogsConfigCreate component
ukrocks007 Apr 10, 2024
08bbf80
Refactor security logs configuration imports and components in Securi…
ukrocks007 Apr 11, 2024
da43d47
Refactor security logs configuration URLs and functions
ukrocks007 Apr 11, 2024
60e7429
Fix error handling in SecurityLogsConfigCreate component and refactor…
ukrocks007 Apr 11, 2024
7964460
Refactor security logs configuration imports and components
ukrocks007 Apr 15, 2024
0ec7b65
Refactor security logs configuration imports and components, and add …
ukrocks007 Apr 15, 2024
e56c6ea
Refactor security logs configuration imports and components
ukrocks007 Apr 15, 2024
6665967
Merge branch 'main' into feature/splunk-direct-delivery
ukrocks007 Apr 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ NEXTAUTH_ADMIN_CREDENTIALS=
RETRACED_HOST_URL=
RETRACED_EXTERNAL_URL=
RETRACED_ADMIN_ROOT_TOKEN=
RETRACED_API_KEY=
RETRACED_PROJECT_ID=
AUDIT_LOG_TEAMS=

# Admin Portal for Terminus (Privacy Vault)
TERMINUS_PROXY_HOST_URL=
Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -452,3 +452,20 @@ jobs:
working-directory: ./${{ matrix.package }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- run: npm install
working-directory: ./ee/security-sinks

- name: Publish Security_Sink
if: github.ref == 'refs/heads/release' || contains(github.ref, 'refs/tags/beta-v')
run: |
npm install -g json
JACKSON_VERSION=${{ needs.ci.outputs.NPM_VERSION }}
json -I -f package.json -e "this.main=\"dist/index.js\""
json -I -f package.json -e "this.types=\"dist/index.d.ts\""
json -I -f package.json -e "this.version=\"${JACKSON_VERSION}\""

npm publish --tag ${{ needs.ci.outputs.PUBLISH_TAG }} --access public
working-directory: ./ee/security-sinks
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ WORKDIR /app
COPY package.json package-lock.json ./
COPY npm npm
COPY internal-ui internal-ui
COPY ee/security-sinks ee/security-sinks
COPY migrate.sh prebuild.ts ./
RUN npm install
RUN npm rebuild --arch=x64 --platform=linux --libc=musl sharp
Expand All @@ -22,6 +23,7 @@ WORKDIR /app

COPY --from=deps /app/npm ./npm
COPY --from=deps /app/internal-ui ./internal-ui
COPY --from=deps /app/ee/security-sinks ./ee/security-sinks
COPY --from=deps /app/node_modules ./node_modules
COPY . .

Expand Down
8 changes: 7 additions & 1 deletion check-locale.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ const fs = require('fs');
const path = require('path');
const regExp = /\bt\('(.*?)'/gm;
const altRegExp = /\bi18nKey='(.*?)'/gm;
const exceptionList = [
'splunk_event_collector_url',
'splunk_hec_endpoint_placeholder',
'default_token',
'default_token_placeholder',
];

const allStrings = {};

Expand Down Expand Up @@ -43,7 +49,7 @@ files.forEach((file) => {
});

Object.keys(localeFile).forEach((key) => {
if (!allStrings[key]) {
if (!allStrings[key] && !exceptionList.includes(key)) {
error = true;
console.error(`Unused key: ${key}`);
}
Expand Down
5 changes: 5 additions & 0 deletions components/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,11 @@ export const Sidebar = ({ isOpen, setIsOpen }: SidebarProps) => {
text: 'Branding',
active: asPath.includes('/admin/settings/branding'),
},
{
href: '/admin/settings/security-logs',
text: 'Security Logs',
active: asPath.includes('/admin/settings/security-logs'),
},
],
},
];
Expand Down
7 changes: 7 additions & 0 deletions ee/branding/api/admin/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { NextApiRequest, NextApiResponse } from 'next';

import jackson from '@lib/jackson';
import retraced from '@ee/retraced';
import { defaultHandler } from '@lib/api';

const handler = async (req: NextApiRequest, res: NextApiResponse) => {
Expand All @@ -15,6 +16,12 @@ const handlePOST = async (req: NextApiRequest, res: NextApiResponse) => {

const { logoUrl, faviconUrl, companyName, primaryColor } = req.body;

retraced.reportAdminPortalEvent({
action: 'portal.branding.update',
crud: 'u',
req,
});

res.json({
data: await brandingController.update({ logoUrl, faviconUrl, companyName, primaryColor }),
});
Expand Down
19 changes: 19 additions & 0 deletions ee/federated-saml/api/admin/[id]/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { NextApiRequest, NextApiResponse } from 'next';

import jackson from '@lib/jackson';
import retraced from '@ee/retraced';
import { defaultHandler } from '@lib/api';

const handler = async (req: NextApiRequest, res: NextApiResponse) => {
Expand Down Expand Up @@ -34,6 +35,15 @@ const handlePATCH = async (req: NextApiRequest, res: NextApiResponse) => {

const updatedApp = await samlFederatedController.app.update(req.body);

retraced.reportAdminPortalEvent({
action: 'federation.app.update',
crud: 'u',
req,
target: {
id: updatedApp.id,
},
});

res.json({ data: updatedApp });
};

Expand All @@ -45,6 +55,15 @@ const handleDELETE = async (req: NextApiRequest, res: NextApiResponse) => {

await samlFederatedController.app.delete({ id });

retraced.reportAdminPortalEvent({
action: 'federation.app.delete',
crud: 'd',
req,
target: {
id,
},
});

res.json({ data: null });
};

Expand Down
10 changes: 10 additions & 0 deletions ee/federated-saml/api/admin/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { NextApiRequest, NextApiResponse } from 'next';

import jackson from '@lib/jackson';
import retraced from '@ee/retraced';
import { defaultHandler } from '@lib/api';
import { parsePaginateApiParams } from '@lib/utils';

Expand All @@ -17,6 +18,15 @@ const handlePOST = async (req: NextApiRequest, res: NextApiResponse) => {

const app = await samlFederatedController.app.create(req.body);

retraced.reportAdminPortalEvent({
action: 'federation.app.create',
crud: 'c',
req,
target: {
id: app.id,
},
});

res.status(201).json({ data: app });
};

Expand Down
Loading