Skip to content

Commit

Permalink
Add notes about acces log data
Browse files Browse the repository at this point in the history
  • Loading branch information
richardTowers committed Aug 14, 2024
1 parent 66e5a10 commit 168dd3f
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
22 changes: 22 additions & 0 deletions app/views/doorkeeper_applications/access_logs.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,28 @@
</div>
</form>

<%= render "govuk_publishing_components/components/details", {
title: "About this data"
} do %>
<p class="govuk-body">
Signon records a "successful authorization" event whenever a user uses Signon to access one of the publishing
applications. This is a record of all of these events for <%= @application.name %>.
</p>
<p class="govuk-body">
Applications cache authentications for around 20 hours, so if a user clicks an application multiple
times a day, they may only appear in the event log once.
</p>
<p class="govuk-body">
<% if DateTime.current.before? DateTime.new(2025, 11, 1) # This branch can be removed after November 2025 %>
Note that authorization data has only been recorded in the Signon event log since November 2023, so it is not
possible to view events before that date.
<% else %>
Note that data in the event log in Signon is only retained for 2 years, so it is not possible to view events
before that date.
<% end %>
</p>
<% end %>
<% if @logs.any? %>
<%= render "components/table", {
caption: pluralize(number_with_delimiter(@logs.total_count), "event"),
Expand Down
29 changes: 29 additions & 0 deletions app/views/doorkeeper_applications/monthly_access_stats.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,35 @@
} %>
</form>

<%= render "govuk_publishing_components/components/details", {
title: "About this data"
} do %>
<p class="govuk-body">
Signon records a "successful authorization" event whenever a user uses Signon to access one of the publishing
applications. This is a monthly count of all of these events for <%= @application.name %>.
</p>
<p class="govuk-body">
Applications cache authentications for around 20 hours, so if a user clicks an application multiple
times a day, they may only appear in the event log once.
</p>
<p class="govuk-body">
The total authorization count is the total number of events recorded in the log for the month (if a
user accesses the same app multiple times, this number will increase).
</p>
<p class="govuk-body">
The unique users authorization count is the number of distinct users who recorded events in the log for the month
(if a user accesses the same app multiple times in a month, this will only count as one unique user).
</p>
<p class="govuk-body">
<% if DateTime.current.before? DateTime.new(2025, 11, 1) # This branch can be removed after November 2025 %>
Note that authorization data has only been recorded in the Signon event log since November 2023, so it is not
possible to view events before that date.
<% else %>
Note that data in the event log in Signon is only retained for 2 years, so it is not possible to view events
before that date.
<% end %>
</p>
<% end %>
<% if @monthly_access_stats.any? %>
<%= render "components/table", {
head: [
Expand Down

0 comments on commit 168dd3f

Please sign in to comment.