Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dmm/add query to protocol report #11339

Merged
merged 4 commits into from
Oct 12, 2024
Merged

Conversation

Sgtpluck
Copy link
Member

@Sgtpluck Sgtpluck commented Oct 11, 2024

🎫 Ticket

Link to the relevant ticket:
Add facial match issuer query to weekly reports

🛠 Summary of changes

This change

  • reorders the protocols_report.rb file because it was hard to find things in it
  • adds a feature usage table, where we can track feature usage based on API requests
  • adds a query to keep track of who is using facial match in production

Note: The reorganization was very noisy, so I split this PR into two commits. The first commit shows the reorganization, the second commit is the meat of the actual change.

@zachmargolis
Copy link
Contributor

Can we add a screenshot of the report to the PR? (with fake/sample data as needed)? Helps to put the changes in context

Comment on lines +322 to +329
event: quote([SAML_AUTH_EVENT, OIDC_AUTH_EVENT]),
}

format(<<~QUERY, params)
fields
name AS protocol,
coalesce(properties.event_properties.service_provider, properties.event_properties.client_id) as issuer
| filter name IN %{event} AND properties.event_properties.success= 1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. I'd consider calling it "events" (plural) since it's a list
  2. updating spacing around success = 1
Suggested change
event: quote([SAML_AUTH_EVENT, OIDC_AUTH_EVENT]),
}
format(<<~QUERY, params)
fields
name AS protocol,
coalesce(properties.event_properties.service_provider, properties.event_properties.client_id) as issuer
| filter name IN %{event} AND properties.event_properties.success= 1
events: quote([SAML_AUTH_EVENT, OIDC_AUTH_EVENT]),
}
format(<<~QUERY, params)
fields
name AS protocol,
coalesce(properties.event_properties.service_provider, properties.event_properties.client_id) as issuer
| filter name IN %{events} AND properties.event_properties.success = 1

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure, i'll fix as long as i'm in here e5d1685

Comment on lines 339 to 348
event: quote([SAML_AUTH_EVENT]),
}

format(<<~QUERY, params)
fields
properties.event_properties.service_provider AS issuer,
properties.event_properties.request_signed = 1 AS signed,
properties.event_properties.request_signed != 1 AS not_signed,
isempty(properties.event_properties.matching_cert_serial) AND signed AS invalid_signature
| filter name IN %{event}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

events (plural)

Suggested change
event: quote([SAML_AUTH_EVENT]),
}
format(<<~QUERY, params)
fields
properties.event_properties.service_provider AS issuer,
properties.event_properties.request_signed = 1 AS signed,
properties.event_properties.request_signed != 1 AS not_signed,
isempty(properties.event_properties.matching_cert_serial) AND signed AS invalid_signature
| filter name IN %{event}
events: quote([SAML_AUTH_EVENT]),
}
format(<<~QUERY, params)
fields
properties.event_properties.service_provider AS issuer,
properties.event_properties.request_signed = 1 AS signed,
properties.event_properties.request_signed != 1 AS not_signed,
isempty(properties.event_properties.matching_cert_serial) AND signed AS invalid_signature
| filter name IN %{events}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed in e5d1685

Copy link
Member

@vrajmohan vrajmohan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Nice work reorganizing the file and cleaning up some headers.

@lmgeorge
Copy link
Contributor

LGTM! (+1 to all of Zach's comments, but none of them are blocking to me.)

@Sgtpluck Sgtpluck merged commit 74b19c4 into main Oct 12, 2024
2 checks passed
@Sgtpluck Sgtpluck deleted the dmm/add-query-to-protocol-report branch October 12, 2024 00:00
@aduth aduth mentioned this pull request Oct 15, 2024
colter-nattrass pushed a commit that referenced this pull request Oct 23, 2024
* changelog: Internal, Analytics, Adding facial match issuers query to report
MrNagoo pushed a commit that referenced this pull request Oct 25, 2024
* changelog: Internal, Analytics, Adding facial match issuers query to report
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants