• Stan Hu's avatar
    Return SSH key details in /internal/allowed response · 362b77dc
    Stan Hu authored
    Right now when a client such as gitlab-shell calls the
    `/api/v4/internal/allowed` API, the response only tells the client what
    user has been granted access, and it's impossible to tell which deploy
    key/token was used in the authentication request.
    
    This commit adds `gl_key_type` (e.g. `deploy_key`) and `gl_key_id`
    fields to the API response so that admins can identify the exact record
    that was used to authenticate the user.
    
    This is needed to support
    https://gitlab.com/gitlab-org/gitlab-shell/-/issues/203.
    362b77dc
base_spec.rb 39.3 KB