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

Cancellation methods for the API #4

Merged
merged 7 commits into from
Jul 27, 2023
Merged

Cancellation methods for the API #4

merged 7 commits into from
Jul 27, 2023

Commits on Jul 25, 2023

  1. Fix func signature on examplebroker

    The GetAuthenticationModes function modifies the receiver, so its
    function signature should use a *exampleBroker to indicate that it does
    modify the receiver.
    denisonbarbosa committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    d2c69b7 View commit details
    Browse the repository at this point in the history
  2. Adding concurrency safety to examplebroker

    The broker can handle multiple requests at once, even for the same
    username, so we need some write safety when doing changes on the broker
    such as adding/deleting keys from the currentSessions map
    denisonbarbosa committed Jul 25, 2023
    Configuration menu
    Copy the full SHA
    6ac044c View commit details
    Browse the repository at this point in the history

Commits on Jul 27, 2023

  1. Add response codes as consts in responses.go

    We were using static strings for handling the broker responses and this
    was prone to error and would complicate future changes, so those values
    should be well-defined somewhere to avoid those obstacles
    denisonbarbosa committed Jul 27, 2023
    Configuration menu
    Copy the full SHA
    811d583 View commit details
    Browse the repository at this point in the history
  2. Adding cancellation methods to the broker API

    This adds both AbortSession and CancelIsAuthorized to the Brokerer
    interface. Those methods allow us to handle cancellation of the calls
    through communication with the actual broker, instead of solely relying
    on context cancellation as it is not possible to do it through dbus.
    denisonbarbosa committed Jul 27, 2023
    Configuration menu
    Copy the full SHA
    c439f9a View commit details
    Browse the repository at this point in the history
  3. Extract sessionID parsing to func

    This is an operation that we do constantly, so it deserves its own
    function.
    denisonbarbosa committed Jul 27, 2023
    Configuration menu
    Copy the full SHA
    235a0a5 View commit details
    Browse the repository at this point in the history
  4. Using new cancel methods on the pam module

    Now that we have a proper cancellation API, this updates the pam
    module with the new way of interacting with those calls.
    denisonbarbosa committed Jul 27, 2023
    Configuration menu
    Copy the full SHA
    e38aa92 View commit details
    Browse the repository at this point in the history
  5. Updating proto files with new service method

    AbortSession is now an exported method that can be used through the
    client
    denisonbarbosa committed Jul 27, 2023
    Configuration menu
    Copy the full SHA
    f54a5f0 View commit details
    Browse the repository at this point in the history