{
  "name": "Is Analytics Summary",
  "id": "IsAnalyticsSummary",
  "thumbnailURL": "",
  "configs": {
    "pubsub": {
      "types": [
        "subscriber"
      ]
    },
    "options": [
      {
        "id": "widgetType",
        "title": "Widget Type",
        "type": {
          "name": "ENUM",
          "possibleValues": [
            "Overall",
            "Local",
            "Federated"
          ]
        },
        "defaultValue": "Overall"
      },
      {
        "id": "headerTitle",
        "title": "Widget Display Name",
        "type": {
          "name": "TEXT",
          "possibleValues": []
        },
        "defaultValue": "Login Attempts Summary"
      }
    ],
    "providerConfig": {
      "configs": {
        "type": "SiddhiStoreDataProvider",
        "config": {
          "siddhiApp":"@App:name(\"IS_ANALYTICS_AUTHENTICATION_AGGREGATIONS\") @App:description(\"Handle Event from IS and save data in a table for Overall Authentication\") define stream ProcessedAuthenticationDataStream (meta_tenantId int, eventId string, username string, localUsername string, userStoreDomain string, tenantDomain string, rolesCommaSeparated string, remoteIp string, region string, inboundAuthType string, serviceProvider string, rememberMeEnabled bool, forceAuthEnabled bool, passiveAuthEnabled bool, stepAuthenticator string, authenticationStep string, authStepSuccess bool, identityProvider string, identityProviderType string, isFirstLogin bool, successValue int, failureValue int, stepSuccessValue int, firstLoginValue int, timestamp long);  @store(type='rdbms', datasource='IS_ANALYTICS_DB') define aggregation AuthStatAgg from ProcessedAuthenticationDataStream select meta_tenantId, username, localUsername, rolesCommaSeparated, serviceProvider, identityProvider, remoteIp, region, userStoreDomain, isFirstLogin, sum(successValue) as authSuccessCount, sum(failureValue) as authFailureCount, sum(stepSuccessValue) as authStepSuccessCount, sum(firstLoginValue) as authFirstSuccessCount, identityProviderType, timestamp group by username, serviceProvider, identityProvider, region, userStoreDomain, isFirstLogin, identityProviderType aggregate by timestamp every second ... year;",
          "queryData": {
            "query": "from AuthStatAgg within {{from}}L, {{to}}L per \"{{per}}s\" select sum(authFailureCount) as authFailureCount, sum(authSuccessCount) as authSuccessCount",
            "queryLocal": "from AuthStatAgg on identityProviderType==\'LOCAL\' within {{from}}L, {{to}}L per \"{{per}}s\" select sum(authFailureCount) as authFailureCount, sum(authStepSuccessCount) as authSuccessCount",
            "queryFederated": "from AuthStatAgg on identityProviderType==\'FEDERATED\' within {{from}}L, {{to}}L per \"{{per}}s\" select sum(authFailureCount) as authFailureCount, sum(authStepSuccessCount) as authSuccessCount"
          },
          "publishingInterval": 60
        }
      }
    }
  }
}
