diff --git a/cmd/api/src/database/migration/migrations/schema.sql b/cmd/api/src/database/migration/migrations/schema.sql index 697dbe311..77aa351f2 100644 --- a/cmd/api/src/database/migration/migrations/schema.sql +++ b/cmd/api/src/database/migration/migrations/schema.sql @@ -660,5 +660,5 @@ INSERT INTO feature_flags (created_at, updated_at, key, name, description, enabl -- Populate parameters table -INSERT INTO parameters (key, name, description, value, id, created_at, updated_at) VALUES ('auth.password_expiration_window', 'Local Auth Password Expiry Window', 'This configuration parameter sets the local auth password expiry window for users that have valid auth secrets. Values for this configuration must follow the duration specification of ISO-8601.', '{"duration": "P90D"}', 1, current_timestamp, current_timestamp); -INSERT INTO parameters (key, name, description, value, id, created_at, updated_at) VALUES ('neo4j.configuration', 'Neo4j Configuration Parameters', 'This configuration parameter sets the BatchWriteSize and the BatchFlushSize for Neo4J.', '{"batch_write_size": 20000, "write_flush_size": 100000}', 2, current_timestamp, current_timestamp); +INSERT INTO parameters (key, name, description, value, created_at, updated_at) VALUES ('auth.password_expiration_window', 'Local Auth Password Expiry Window', 'This configuration parameter sets the local auth password expiry window for users that have valid auth secrets. Values for this configuration must follow the duration specification of ISO-8601.', '{"duration": "P90D"}', current_timestamp, current_timestamp); +INSERT INTO parameters (key, name, description, value, created_at, updated_at) VALUES ('neo4j.configuration', 'Neo4j Configuration Parameters', 'This configuration parameter sets the BatchWriteSize and the BatchFlushSize for Neo4J.', '{"batch_write_size": 20000, "write_flush_size": 100000}', current_timestamp, current_timestamp); diff --git a/cmd/api/src/database/migration/migrations/v5.15.0.sql b/cmd/api/src/database/migration/migrations/v5.15.0.sql index e40d065c5..702a065fb 100644 --- a/cmd/api/src/database/migration/migrations/v5.15.0.sql +++ b/cmd/api/src/database/migration/migrations/v5.15.0.sql @@ -73,3 +73,8 @@ INSERT INTO roles_permissions (role_id, permission_id) VALUES ((SELECT id FROM r 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 = 'saved_queries' and permissions.name = 'Read')) ON CONFLICT DO NOTHING; 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 = 'saved_queries' and permissions.name = 'Write')) ON CONFLICT DO NOTHING; 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 = 'Mutate')) ON CONFLICT DO NOTHING; + +CREATE EXTENSION IF NOT EXISTS pg_trgm; + +CREATE INDEX IF NOT EXISTS idx_saved_queries_description ON saved_queries using gin(description gin_trgm_ops); +CREATE INDEX IF NOT EXISTS idx_saved_queries_name ON saved_queries USING gin(name gin_trgm_ops); diff --git a/cmd/api/src/database/migration/migrations/v5.16.0.sql b/cmd/api/src/database/migration/migrations/v5.16.0.sql deleted file mode 100644 index 6ed6f62fa..000000000 --- a/cmd/api/src/database/migration/migrations/v5.16.0.sql +++ /dev/null @@ -1,21 +0,0 @@ --- 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 - - -CREATE EXTENSION IF NOT EXISTS pg_trgm; - -CREATE INDEX IF NOT EXISTS idx_saved_queries_description ON saved_queries using gin(description gin_trgm_ops); -CREATE INDEX IF NOT EXISTS idx_saved_queries_name ON saved_queries USING gin(name gin_trgm_ops); diff --git a/dockerfiles/bloodhound.Dockerfile b/dockerfiles/bloodhound.Dockerfile index bac528b2a..504ae4763 100644 --- a/dockerfiles/bloodhound.Dockerfile +++ b/dockerfiles/bloodhound.Dockerfile @@ -17,8 +17,8 @@ ######## # Global build args ################ -ARG SHARPHOUND_VERSION=v2.4.1 -ARG AZUREHOUND_VERSION=v2.1.9 +ARG SHARPHOUND_VERSION=v2.5.6 +ARG AZUREHOUND_VERSION=v2.2.1 ######## # Golang Image diff --git a/tools/docker-compose/api.Dockerfile b/tools/docker-compose/api.Dockerfile index c148c8049..f58d5be62 100644 --- a/tools/docker-compose/api.Dockerfile +++ b/tools/docker-compose/api.Dockerfile @@ -17,8 +17,8 @@ ######## # Global build args ################ -ARG SHARPHOUND_VERSION=v2.4.1 -ARG AZUREHOUND_VERSION=v2.1.9 +ARG SHARPHOUND_VERSION=v2.5.6 +ARG AZUREHOUND_VERSION=v2.2.1 ######## # Package other assets