Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Configuring logging is covered  Zone Management: Logging page.


Logging

YOUnite Uses Elastic

Younite logs directly to elastic via the elastic restful API.

All activity through the mdm restful API is logged synchronously, if elastic is down, calls to the api will fail with forbidden (403) errors. Once elastic is available again, the API will function again.

All activity in internal services are logged (a?)synchronously. If elastic is down these will still succeed, but there will be no logging. This may be changed in the future to use AMQ so as to not drop log entries if elastic is down.

All activity on the the message queue for the router will be logged (a?)synchronously, this may or may not include the payload, depending on configuration.



Per Resource Indices

Each resource's log entries are kept in separate indices that are created either when the resource is created or when the resource is accessed, depending on the type of resource. Index names always start with "mdm-", this is used for both easy identification, and to take advantage of the ability to configure elastic to forbid creation of indexes on the fly when the first data entry is posted to it. This allows the logging system to be in control of creating indices and mappings as needed.

Resource indices are created with the naming pattern "mdm-RESOURCE-UUID" where RESOURCE is the type of resource and, UUID is the zone's public facing UUID identifier. E.g. mdm-zone-a2aaedc7-591a-4761-8e35-da875b1e6ac5

Per User (AuthIdentity) Alias's

Alias's are created for the purposes of grouping indices together for ease of use in creating templates in Kibana for dashboards and views that are available through the younite web application.

Alisas names are of the pattern mdm-alias-userUUID where userUUID is the public facing UUID identifier of the authIdentity

What Gets Logged

Currently logged, for API access, is the date/time, the api path, resource type (matches the index type e.g. mdm-zone is resource type zone, mdm-domain is resource type domain), resource UUID,whether the access was allowed or rejected via ouath, the ssoid of the oauth token presented for access, and the operation type (GET,PUT,DELETE, etc)

Currently logged for resource service layer (internal, used by both the api and the message router) is CRUD access to the resource. The ssoid, timetamp,resource type (same as the index type), resource UUID, and action (C,R,U,D).

Logging at the messagebus/router layer goes here...

Either of these current logging entries can be easily extended to log additional request data (the object model being created,updated, etc) or response data (results object model of a get, etc...) for complete auditing of not only who made the modification, but what the modification was. This could be done for the entire resource spectrum , or only specific resources. If needed the payload data could be easily logged to separate index requiring extended permissions for access.

TODO - PROVIDE TABLE OF WHAT IS LOGGED AND WHAT IS LOGGED ON A PER/ZONE BASIS VS ENTIRE ECOSYSTEM

How it is secured

Elastic and Kibana are secured via an nginx proxy that authorizes each request via the Ouath. An OAuth bearer token is carried along on each request via cookie when the user clicks the link in the application dashboard to bring up a kibana based view or dashbord page. This secures access to elastic and kibana from the public internet. If needed the proxy piece could be integrated with elastic in a single container to provide tighter security. This was not done in the dev environment, for ease of development and testing, but could be done easily for a stand alone elastic server(s).

Kibana

When a user clicks a link to display logging information via kibana, the url is modified as it is passed through authorization code in the nginx proxy. The modification uses the information in the oauth check_token response to pass along the elastic alias that kibana will use to populate the data in the dashboard. Access to kibana is allowed if a user has the correct scope for access to kibana. By default all users have this scope. Logging information that is displayed/available is controlled through the usage of either the alias for users uuid, which contains all the indices they have access to, or via kibana searches hitting specfic indices which the user has permissions for directly (also encoded in the oauth token) 


Elastic

Elastic is secured via the same nginx proxy that protects kibana. Permissions to allow read access to an index or controlled via the same permissions mechanism in the token that is used to allow access for that user to the younite API. If a user has GET or ALL permissions to a zone, they have read only access to the data in the index in elastic for the same zone.



Notifications

For more information goto


Highlevel discussion on what sort of notifications get sent out and how we leverage webhooks.