Skip to content

Commit

Permalink
actual changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mahirchavda committed Aug 1, 2024
1 parent e92e62b commit e53c1a1
Show file tree
Hide file tree
Showing 19 changed files with 241 additions and 198 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
.DS_Store
.DS_Store
__pycache__/
*.pyc
output/
2 changes: 2 additions & 0 deletions TA-microsoft-graph-security-score/README/inputs.conf.spec
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
[graph_security_score_input://<name>]
interval =
index =
azure_ad_tenant_id = <string> Azure Tenant ID
application_id = <string> Application ID
client_secret = <string> Client Secret
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
[proxy]
proxy_enabled =
proxy_type =
proxy_url =
proxy_port =
proxy_username =
proxy_password =
proxy_rdns =

[logging]
loglevel = <string> DEBUG|INFO|WARNING|ERROR|CRITICAL
loglevel =
2 changes: 2 additions & 0 deletions TA-microsoft-graph-security-score/VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
1.2.0
1.2.0
113 changes: 55 additions & 58 deletions TA-microsoft-graph-security-score/app.manifest
Original file line number Diff line number Diff line change
@@ -1,62 +1,59 @@
{
"schemaVersion": "2.0.0",
"info": {
"title": "Microsoft Graph Security Score Add-on",
"id": {
"group": null,
"name": "TA-microsoft-graph-security-score",
"version": "1.1.1"
"dependencies": {},
"incompatibleApps": {},
"info": {
"author": [
{
"company": null,
"email": null,
"name": "CrossRealms International"
}
],
"classification": {
"categories": [],
"developmentStatus": null,
"intendedAudience": null
},
"commonInformationModels": null,
"description": "This Add-on pulls secure score from Microsoft Graph Security API.",
"id": {
"group": null,
"name": "TA-microsoft-graph-security-score",
"version": "1.2.0"
},
"license": {
"name": null,
"text": null,
"uri": null
},
"privacyPolicy": {
"name": null,
"text": null,
"uri": null
},
"releaseDate": null,
"releaseNotes": {
"name": null,
"text": null,
"uri": null
},
"title": "Microsoft Graph Security Score Add-on"
},
"author": [
{
"name": "CrossRealms International",
"email": null,
"company": null
}
],
"releaseDate": null,
"description": "This Add-on pulls secure score from Microsoft Graph Security API.",
"classification": {
"intendedAudience": null,
"categories": [],
"developmentStatus": null
},
"commonInformationModels": null,
"license": {
"name": null,
"text": null,
"uri": null
},
"privacyPolicy": {
"name": null,
"text": null,
"uri": null
"inputGroups": {},
"platformRequirements": {
"splunk": {
"Enterprise": "*"
}
},
"releaseNotes": {
"name": null,
"text": null,
"uri": null
}
},
"dependencies": {
},
"tasks": [],
"inputGroups": {
},
"incompatibleApps": {
},
"supportedDeployments": [
"_standalone",
"_distributed",
"_search_head_clustering"
],
"platformRequirements": {
"splunk": {
"Enterprise": "*"
}
},
"targetWorkloads": [
"_search_heads",
"_forwarders"
]
"schemaVersion": "2.0.0",
"supportedDeployments": [
"_standalone",
"_distributed",
"_search_head_clustering"
],
"targetWorkloads": [
"_search_heads",
"_forwarders"
],
"tasks": []
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"meta": {
"name": "TA-microsoft-graph-security-score",
"displayName": "Microsoft Graph Security Score Add-on",
"version": "1.1.1R6797276",
"version": "1.2.0",
"apiVersion": "5.28.1",
"restRoot": "TA_microsoft_graph_security_score",
"schemaVersion": "2.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"openapi": "3.0.0",
"info": {
"title": "TA-microsoft-graph-security-score",
"version": "1.1.1R6797276",
"version": "1.2.0",
"description": "Microsoft Graph Security Score Add-on",
"contact": {
"name": "CrossRealms International"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

import ta_microsoft_graph_security_score_declare
import import_declare_test

from splunktaucclib.rest_handler.endpoint import (
field,
Expand All @@ -8,7 +8,8 @@
DataInputModel,
)
from splunktaucclib.rest_handler import admin_external, util
from splunk_aoblib.rest_migration import ConfigMigrationHandler
from splunktaucclib.rest_handler.admin_external import AdminExternalHandler
import logging

util.remove_http_proxy_env_vars()

Expand All @@ -29,8 +30,8 @@
encrypted=False,
default='default',
validator=validator.String(
min_len=1,
max_len=80,
min_len=1,
)
),
field.RestField(
Expand All @@ -39,8 +40,8 @@
encrypted=False,
default=None,
validator=validator.String(
min_len=0,
max_len=8192,
min_len=0,
)
),
field.RestField(
Expand All @@ -49,8 +50,8 @@
encrypted=False,
default=None,
validator=validator.String(
min_len=0,
max_len=8192,
min_len=0,
)
),
field.RestField(
Expand All @@ -59,8 +60,8 @@
encrypted=True,
default=None,
validator=validator.String(
min_len=0,
max_len=8192,
min_len=0,
)
),

Expand All @@ -82,7 +83,8 @@


if __name__ == '__main__':
logging.getLogger().addHandler(logging.NullHandler())
admin_external.handle(
endpoint,
handler=ConfigMigrationHandler,
handler=AdminExternalHandler,
)
75 changes: 72 additions & 3 deletions TA-microsoft-graph-security-score/bin/TA_microsoft_graph_security_score_rh_settings.py
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

import ta_microsoft_graph_security_score_declare
import import_declare_test

from splunktaucclib.rest_handler.endpoint import (
field,
Expand All @@ -8,11 +8,78 @@
MultipleModel,
)
from splunktaucclib.rest_handler import admin_external, util
from splunk_aoblib.rest_migration import ConfigMigrationHandler
from splunktaucclib.rest_handler.admin_external import AdminExternalHandler
import logging

util.remove_http_proxy_env_vars()


fields_proxy = [
field.RestField(
'proxy_enabled',
required=False,
encrypted=False,
default=None,
validator=None
),
field.RestField(
'proxy_type',
required=False,
encrypted=False,
default='http',
validator=None
),
field.RestField(
'proxy_url',
required=False,
encrypted=False,
default=None,
validator=validator.String(
max_len=4096,
min_len=0,
)
),
field.RestField(
'proxy_port',
required=False,
encrypted=False,
default=None,
validator=validator.Number(
max_val=65535,
min_val=1,
)
),
field.RestField(
'proxy_username',
required=False,
encrypted=False,
default=None,
validator=validator.String(
max_len=50,
min_len=0,
)
),
field.RestField(
'proxy_password',
required=False,
encrypted=True,
default=None,
validator=validator.String(
max_len=8192,
min_len=0,
)
),
field.RestField(
'proxy_rdns',
required=False,
encrypted=False,
default=None,
validator=None
)
]
model_proxy = RestModel(fields_proxy, name='proxy')


fields_logging = [
field.RestField(
'loglevel',
Expand All @@ -28,13 +95,15 @@
endpoint = MultipleModel(
'ta_microsoft_graph_security_score_settings',
models=[
model_proxy,
model_logging
],
)


if __name__ == '__main__':
logging.getLogger().addHandler(logging.NullHandler())
admin_external.handle(
endpoint,
handler=ConfigMigrationHandler,
handler=AdminExternalHandler,
)
Loading

0 comments on commit e53c1a1

Please sign in to comment.