Merge branch 'develop' of github.com:cerebrate-project/cerebrate into develop

pull/85/head
iglocska 2022-01-19 14:59:48 +01:00
commit 475a13847e
No known key found for this signature in database
GPG Key ID: BEA224F1FEF113AC
3 changed files with 39 additions and 16 deletions

View File

@ -0,0 +1,17 @@
# Prerequisites based on usecases
This document list the requirements that have to be met in order to perform the desired usecase.
## Connect a local tool to cerebrate
- **Networking**: The *cerebrate* application must be able to contact the local tool service. That means the address and the port of the local tool must be reachable by *cerebrate*.
- **User permissions**: Depends on the actions performed by Cerebrate on the local tool.
- Example: For a standard MISP configuration, a simple user with the `user` role is enough for Cerebrate to pass the health check.
## Conect two cerebrate instances together
- **Networking**: The two *cerebrate* applications must be able to contact each others. That means the address and the port of both tools must be reachable by the other one.
- **User permissions**: No specific role or set of permission is required. Any user role can be used.
## Connect two local tools through cerebrate
- **Networking**: The two *cerebrate* applications must be able to contact each others. That means the address and the port of both tools must be reachable by the other one. This also applies to both the local tools.
- **User permissions**: Depends on the actions performed by Cerebrate on the local tool.
- Example: For a standard MISP configuration, in order to have two instance connected, the API key used by *cebrate* to orchestrate the inter-connection must belong to a user having the `site-admin` permission flag. This is essential as only the `site-admin` permission allows to create synchronisation links between MISP instances.

View File

@ -24,21 +24,24 @@ class CommonConnectorTools
public function __construct()
{
Log::setConfig("LocalToolDebug", [
if (empty(Log::getConfig("LocalToolDebug{$this->connectorName}"))) {
Log::setConfig("LocalToolDebug{$this->connectorName}", [
'className' => FileLog::class,
'path' => LOGS,
'file' => "{$this->connectorName}-debug",
'scopes' => [$this->connectorName],
'levels' => ['notice', 'info', 'debug'],
]);
Log::setConfig("LocalToolError", [
}
if (empty(Log::getConfig("LocalToolError{$this->connectorName}"))) {
Log::setConfig("LocalToolError{$this->connectorName}", [
'className' => FileLog::class,
'path' => LOGS,
'file' => "{$this->connectorName}-error",
'scopes' => [$this->connectorName],
'levels' => ['warning', 'error', 'critical', 'alert', 'emergency'],
]);
}
}
protected function logDebug($message)

View File

@ -11,7 +11,10 @@ use Cake\Routing\Router;
<div class="fw-light"><?= __('Logged in as') ?></div>
<div>
<?= $this->SocialProvider->getIcon($this->request->getAttribute('identity')) ?>
[<?= h($loggedUser['organisation']['name']) ?>] <strong><?= h($this->request->getAttribute('identity')['username']) ?></strong>
<span class="ms-1 me-3">
[<?= h($loggedUser['organisation']['name']) ?>]
<strong><?= h($this->request->getAttribute('identity')['username']) ?></strong>
</span>
</div>
</h6>
<div class="dropdown-divider"></div>