-
Notifications
You must be signed in to change notification settings - Fork 517
[Aerospace Sparta] Add sparta connector verified #5116
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
base: master
Are you sure you want to change the base?
Conversation
…lient_api and connector files
|
If the connector is considered as "Verified" after this PR, the manifest has to be updated also to include it in the composer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great!
Just two small comments.
Thanks!
| #send_to_directory_path: 'ChangeMe' # if CONNECTOR_SEND_TO_DIRECTORY is True, you must specify a path | ||
| #send_to_directory_retention: ChangeMe # Default: 7, in days | ||
| #name: 'Aerospace SPARTA' | ||
| #scope: '["attack-pattern", "course-of-action", "indicator", "identity"]' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| class ConfigLoader(ConfigBaseSettings): | ||
| """Interface for loading global configuration settings.""" | ||
|
|
||
| opencti: _ConfigLoaderOCTI = Field( | ||
| default_factory=_ConfigLoaderOCTI, | ||
| description="OpenCTI configurations.", | ||
| ) | ||
| connector: ConfigLoaderConnector = Field( | ||
| default_factory=ConfigLoaderConnector, | ||
| description="Connector configurations.", | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we use the connectors-sdk?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes please! 🙏
| if env_path.exists(): | ||
| return ( | ||
| DotEnvSettingsSource( | ||
| settings_cls, | ||
| env_file=env_path, | ||
| env_ignore_empty=True, | ||
| env_file_encoding="utf-8", | ||
| ), | ||
| ) | ||
| elif yaml_path.exists(): | ||
| return ( | ||
| YamlConfigSettingsSource( | ||
| settings_cls, | ||
| yaml_file=yaml_path, | ||
| yaml_file_encoding="utf-8", | ||
| ), | ||
| ) | ||
| else: | ||
| return ( | ||
| EnvSettingsSource( | ||
| settings_cls, | ||
| env_ignore_empty=True, | ||
| ), | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Our default order is:
- Environment variables
- YAML file
- .env file
- Default values
But implementing this might cause a breaking change for the client. How should we proceed?

Proposed changes
To do after review:
Related issues
Checklist