Skip to content

Endpoint get_info doesn't recognize token auth #1442

@JustScreaMy

Description

@JustScreaMy

Calling endpoint /api/info with Token returns different values than warpgate-http-session

Token request

curl --request GET \
  --url https://DOMAIN/@warpgate/api/info \
  --header 'Accept: application/json; charset=utf-8' \
  --header 'X-Warpgate-Token: MY_TOKEN'

Token response

{
  "authorized_via_sso_with_single_logout": false,
  "authorized_via_ticket": false,
  "external_host": "DOMAIN",
  "own_credential_management_allowed": true,
  "ports": {
    "http": null,
    "mysql": null,
    "postgres": null,
    "ssh": null
  },
  "selected_target": null,
  "setup_state": null,
  "username": null,
  "version": null
}

Session request

curl 'https://DOMAIN/@warpgate/api/info' \
  -H 'Accept: application/json; charset=utf-8'\
  -H 'Cookie: warpgate-http-session=SESSION_TOKEN'

Session response

{
  "authorized_via_sso_with_single_logout": false,
  "authorized_via_ticket": false,
  "external_host": "DOMAIN",
  "own_credential_management_allowed": true,
  "ports": {
    "http": 8888,
    "mysql": 33306,
    "postgres": 55432,
    "ssh": 2222
  },
  "selected_target": null,
  "setup_state": null,
  "username": "my.username",
  "version": "v0.15.0"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions