-
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add job description to scheduler * Update example for dashboards in ProvisionNewCustomer class * updated dependencies * updated logs page link location * Add logging statement to execute_integration function in integrations.py * put office365 route * added scheduler api/types * updated login components * added scheduler page * updated scheduler api * tmp * tmp * updated job type * updated job card * Update monitoring_alert.py and monitoring_alert.schema with response model changes * Refactor monitoring_alert.py and monitoring_alert.schema with response model changes * Refactor monitoring_alert.py and monitoring_alert.schema with response model changes * updated scheduler page icon * refactor props * Add delete_monitoring_alert endpoint to monitoring_alert.py * Update branch name in Docker workflow from 'scheduler-page' to 'main' * added job actions component * Refactor provision_content_pack function to accept ProvisionContentPackRequest in graylog/routes/provision.py Added fortinet content pack templates * Update docker-compose.yml to version v0.0.8 * add network connectors db things * added network connectors population to db * network connectors routes * Update fortinet.md * Update fortinet.md * Update fortinet.md * Update fortinet.md * Update fortinet.md * Create opnsense.md * Update opnsense.md * Update opnsense.md * Fix error handling in provision.py * Fix error handling in provision.py * Add route to remove a user from a customer in dfir_iris/routes/users.py * Fix error handling in provision.py * Fix error handling in provision.py * Refactor customer network connector processing in routes.py * fortinet provisioning initial setup * just about all fortinet provision stuff...but need to still assign newly created stream to the pipeline * updated scheduler api * added next run time component * updated dependencies * updated job actions component * added job form * precommit fixes --------- Co-authored-by: Davide Di Modica <webmaster.ddm@gmail.com> Co-authored-by: juan-socfortress <111928961+juan-socfortress@users.noreply.github.com>
- Loading branch information
1 parent
e6b8778
commit 16f47cb
Showing
72 changed files
with
4,085 additions
and
323 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
123 changes: 123 additions & 0 deletions
123
backend/alembic/versions/74a095d63af4_add_network_connectors_tables.py
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,123 @@ | ||
"""Add Network Connectors Tables | ||
Revision ID: 74a095d63af4 | ||
Revises: c3ad5012f4db | ||
Create Date: 2024-04-25 13:03:22.718120 | ||
""" | ||
from typing import Sequence | ||
from typing import Union | ||
|
||
import sqlalchemy as sa | ||
from sqlalchemy.dialects import mysql | ||
|
||
from alembic import op | ||
|
||
# revision identifiers, used by Alembic. | ||
revision: str = "74a095d63af4" | ||
down_revision: Union[str, None] = "c3ad5012f4db" | ||
branch_labels: Union[str, Sequence[str], None] = None | ||
depends_on: Union[str, Sequence[str], None] = None | ||
|
||
|
||
def upgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.create_table( | ||
"available_network_connectors", | ||
sa.Column("id", sa.Integer(), nullable=False), | ||
sa.Column("network_connector_name", sa.String(length=255), nullable=False), | ||
sa.Column("description", sa.String(length=1024), nullable=False), | ||
sa.Column("network_connector_details", mysql.TEXT(length=1000000), nullable=False), | ||
sa.PrimaryKeyConstraint("id"), | ||
) | ||
op.create_table( | ||
"customer_network_connectors", | ||
sa.Column("id", sa.Integer(), nullable=False), | ||
sa.Column("customer_code", sa.String(length=50), nullable=False), | ||
sa.Column("customer_name", sa.String(length=255), nullable=False), | ||
sa.Column("network_connector_service_id", sa.Integer(), nullable=False), | ||
sa.Column("network_connector_service_name", sa.String(length=255), nullable=False), | ||
sa.Column("deployed", sa.Boolean(), nullable=False), | ||
sa.PrimaryKeyConstraint("id"), | ||
) | ||
op.create_table( | ||
"customer_network_connectors_meta", | ||
sa.Column("id", sa.Integer(), nullable=False), | ||
sa.Column("customer_code", sa.String(length=50), nullable=False), | ||
sa.Column("network_connector_name", sa.String(length=255), nullable=False), | ||
sa.Column("graylog_input_id", sa.String(length=1024), nullable=True), | ||
sa.Column("graylog_index_id", sa.String(length=1024), nullable=False), | ||
sa.Column("graylog_stream_id", sa.String(length=1024), nullable=False), | ||
sa.Column("grafana_org_id", sa.String(length=1024), nullable=False), | ||
sa.Column("grafana_dashboard_folder_id", sa.String(length=1024), nullable=False), | ||
sa.PrimaryKeyConstraint("id"), | ||
) | ||
op.create_table( | ||
"network_connectors_services", | ||
sa.Column("id", sa.Integer(), nullable=False), | ||
sa.Column("service_name", sa.String(length=255), nullable=False), | ||
sa.Column("auth_type", sa.String(length=50), nullable=False), | ||
sa.PrimaryKeyConstraint("id"), | ||
) | ||
op.create_table( | ||
"available_network_connectors_keys", | ||
sa.Column("id", sa.Integer(), nullable=False), | ||
sa.Column("network_connector_id", sa.Integer(), nullable=True), | ||
sa.Column("network_connector_name", sa.String(length=255), nullable=False), | ||
sa.Column("auth_key_name", sa.String(length=255), nullable=False), | ||
sa.ForeignKeyConstraint( | ||
["network_connector_id"], | ||
["available_network_connectors.id"], | ||
), | ||
sa.PrimaryKeyConstraint("id"), | ||
) | ||
op.create_table( | ||
"network_connectors_configs", | ||
sa.Column("id", sa.Integer(), nullable=False), | ||
sa.Column("network_connector_service_id", sa.Integer(), nullable=True), | ||
sa.Column("config_key", sa.String(length=255), nullable=False), | ||
sa.Column("config_value", sa.String(length=1024), nullable=False), | ||
sa.ForeignKeyConstraint( | ||
["network_connector_service_id"], | ||
["network_connectors_services.id"], | ||
), | ||
sa.PrimaryKeyConstraint("id"), | ||
) | ||
op.create_table( | ||
"network_connectors_subscriptions", | ||
sa.Column("id", sa.Integer(), nullable=False), | ||
sa.Column("customer_id", sa.Integer(), nullable=True), | ||
sa.Column("network_connectors_service_id", sa.Integer(), nullable=False), | ||
sa.ForeignKeyConstraint( | ||
["customer_id"], | ||
["customer_network_connectors.id"], | ||
), | ||
sa.ForeignKeyConstraint( | ||
["network_connectors_service_id"], | ||
["network_connectors_services.id"], | ||
), | ||
sa.PrimaryKeyConstraint("id"), | ||
) | ||
op.create_table( | ||
"network_connectors_keys", | ||
sa.Column("id", sa.Integer(), nullable=True), | ||
sa.Column("subscription_id", sa.Integer(), nullable=True), | ||
sa.Column("auth_key_name", sa.String(length=255), nullable=False), | ||
sa.Column("auth_value", sa.String(length=1024), nullable=False), | ||
sa.ForeignKeyConstraint(["subscription_id"], ["network_connectors_subscriptions.id"]), | ||
sa.PrimaryKeyConstraint("id"), | ||
) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_table("network_connectors_keys") | ||
op.drop_table("network_connectors_subscriptions") | ||
op.drop_table("network_connectors_configs") | ||
op.drop_table("available_network_connectors_keys") | ||
op.drop_table("network_connectors_services") | ||
op.drop_table("customer_network_connectors_meta") | ||
op.drop_table("customer_network_connectors") | ||
op.drop_table("available_network_connectors") | ||
# ### end Alembic commands ### |
31 changes: 31 additions & 0 deletions
31
backend/alembic/versions/c3ad5012f4db_add_job_description_to_job_metadata_.py
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,31 @@ | ||
"""Add Job Description to Job Metadata Table | ||
Revision ID: c3ad5012f4db | ||
Revises: bdf40d064ed1 | ||
Create Date: 2024-04-23 14:11:01.313978 | ||
""" | ||
from typing import Sequence | ||
from typing import Union | ||
|
||
import sqlalchemy as sa | ||
|
||
from alembic import op | ||
|
||
# revision identifiers, used by Alembic. | ||
revision: str = "c3ad5012f4db" | ||
down_revision: Union[str, None] = "bdf40d064ed1" | ||
branch_labels: Union[str, Sequence[str], None] = None | ||
depends_on: Union[str, Sequence[str], None] = None | ||
|
||
|
||
def upgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.add_column("scheduled_job_metadata", sa.Column("job_description", sa.String(length=1024), nullable=True)) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
pass | ||
# ### end Alembic commands ### |
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
Oops, something went wrong.