-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into BED-4852-oidc-delete-endpoint
- Loading branch information
Showing
12 changed files
with
184 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
-- Copyright 2024 Specter Ops, Inc. | ||
-- | ||
-- Licensed under the Apache License, Version 2.0 | ||
-- you may not use this file except in compliance with the License. | ||
-- You may obtain a copy of the License at | ||
-- | ||
-- http://www.apache.org/licenses/LICENSE-2.0 | ||
-- | ||
-- Unless required by applicable law or agreed to in writing, software | ||
-- distributed under the License is distributed on an "AS IS" BASIS, | ||
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
-- See the License for the specific language governing permissions and | ||
-- limitations under the License. | ||
-- | ||
-- SPDX-License-Identifier: Apache-2.0 | ||
|
||
-- Add updated posture page feature flag | ||
INSERT INTO feature_flags (created_at, updated_at, key, name, description, enabled, user_updatable) | ||
VALUES (current_timestamp, | ||
current_timestamp, | ||
'updated_posture_page', | ||
'Updated Posture Page', | ||
'Enables the updated version of the posture page in the UI application', | ||
false, | ||
false) | ||
ON CONFLICT DO NOTHING; | ||
|
||
INSERT INTO permissions (authority, name, created_at, updated_at) VALUES ('graphdb', 'Ingest', current_timestamp, current_timestamp) ON CONFLICT DO NOTHING; | ||
|
||
-- Grant the Upload-Only user GraphDBIngest permissions | ||
INSERT INTO roles_permissions (role_id, permission_id) | ||
VALUES ((SELECT id FROM roles WHERE roles.name = 'Upload-Only'), | ||
(SELECT id FROM permissions WHERE permissions.authority = 'graphdb' and permissions.name = 'Ingest')) | ||
ON CONFLICT DO NOTHING; | ||
|
||
-- Grant the Power User user GraphDBIngest permissions | ||
INSERT INTO roles_permissions (role_id, permission_id) | ||
VALUES ((SELECT id FROM roles WHERE roles.name = 'Power User'), | ||
(SELECT id FROM permissions WHERE permissions.authority = 'graphdb' and permissions.name = 'Ingest')) | ||
ON CONFLICT DO NOTHING; | ||
|
||
-- Grant the Admininstrator user GraphDBIngest permissions | ||
INSERT INTO roles_permissions (role_id, permission_id) | ||
VALUES ((SELECT id FROM roles WHERE roles.name = 'Administrator'), | ||
(SELECT id FROM permissions WHERE permissions.authority = 'graphdb' and permissions.name = 'Ingest')) | ||
ON CONFLICT DO NOTHING; | ||
|
||
-- Remove the GraphDBWrite permission from the Upload-Only role | ||
DELETE FROM roles_permissions | ||
WHERE role_id = (SELECT id FROM roles WHERE roles.name = 'Upload-Only') | ||
AND permission_id = (SELECT id FROM permissions WHERE permissions.authority = 'graphdb' AND permissions.name = 'Write'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters