Hi All,

According to discussion had with IS team and DAS team please find the new
implementation design for logged in Users / Sessions monitoring and session
termination.


​


   - For the first phase of implementation WSO2 Identity Server does not
   directly persist any information into database rather it publishes
   necessary information like authenticated user, user agent, IP address
   ...etc to Data Analytics Server (DAS).
   - DAS persists data into necessary tables and Identity Server Side
   dashboard gadget utilize DAS REST APIs [1] to retrieve data from tables.

Sample data from DAS REST API as below. We might need to do more processing
on data coming from DAS REST APIs.

[{"id":"7102baf4-3b93-3ffa-8847-7f099abbd608","tableName":"ORG_WSO2_IS_ANALYTICS_STREAM_ACTIVE_SESSIONS","timestamp":1467908094432,"values":{"region":"NOT_AVAILABLE","userAgent":"Mozilla/5.0
(X11; Linux x86_64; rv:37.0) Gecko/20100101
Firefox/37.0","renewTimestamp":1467908094431,"IP":"127.0.0.1","startTimestamp":1467908094431,"terminationTimestamp":1467908994431,"hour":21,"tenantDomain":"carbon.super","minute":44,"sessionId":"taKsR8z1Mm+wWQBW8zPWOqibn5hSbX0mdO2fKgK59yQ\u003d","month":7,"action":1,"userName":"admin","year":2016,"day":7,"rememberMeFlag":false,"userstoreDomain":"PRIMARY"}}]

Underneath DAS table structure is

tableName "ORG_WSO2_IS_ANALYTICS_STREAM_ACTIVE_SESSIONS", schema "sessionId
STRING, startTimestamp LONG, renewTimestamp LONG, terminationTimestamp
LONG, year INT, month INT, day INT, hour INT, minute INT, action INT,
userName STRING, userstoreDomain STRING, IP STRING, region STRING,
tenantDomain STRING, rememberMeFlag BOOLEAN, userAgent STRING, _tenantId
INT, _timestamp LONG -i", primaryKeys "sessionId"


*We have to consider having multiple sessions for same user and having
multiple usernames for same session as well. *

[1] https://docs.wso2.com/display/DAS300/Analytics+REST+API+Guide

-- 
Gayan Gunawardana
Software Engineer; WSO2 Inc.; http://wso2.com/
Email: [email protected]
Mobile: +94 (71) 8020933
_______________________________________________
Architecture mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to