kbase / blobstore

Simple S3 backed file storage.
MIT License
0 stars 3 forks source link

Get auth token from cookie #148

Closed MrCreosote closed 5 months ago

MrCreosote commented 5 months ago
$ curl --cookie "kbase_session=$KBASE_CI_TOKEN" http://localhost:8080/node/06cc2b59-b33c-460a-8332-151a509b6d20/acl
{
  "data": {
    "delete": [
      "057abd01-95db-4500-9541-8ce2a925c3e3"
    ],
    "owner": "057abd01-95db-4500-9541-8ce2a925c3e3",
    "public": {
      "delete": false,
      "read": false,
      "write": false
    },
    "read": [
      "057abd01-95db-4500-9541-8ce2a925c3e3"
    ],
    "write": [
      "057abd01-95db-4500-9541-8ce2a925c3e3"
    ]
  },
  "error": null,
  "status": 200
}
$ curl --cookie "kbase_sessionx=$KBASE_CI_TOKEN" http://localhost:8080/node/06cc2b59-b33c-460a-8332-151a509b6d20/acl
{
  "data": null,
  "error": [
    "User Unauthorized"
  ],
  "status": 401
}
codecov[bot] commented 5 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 90.74%. Comparing base (44bf972) to head (60864d4). Report is 2 commits behind head on develop.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #148 +/- ## =========================================== + Coverage 90.65% 90.74% +0.09% =========================================== Files 14 14 Lines 2033 2053 +20 =========================================== + Hits 1843 1863 +20 Misses 157 157 Partials 33 33 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

Xiangs18 commented 5 months ago

What's the difference between deploy.cfg and deployment.cfg.tmpl? They look very similar

MrCreosote commented 5 months ago

What's the difference between deploy.cfg and deployment.cfg.tmpl? They look very similar

It's historical. deplioy.cfg came first when we were deploying on bare metal or in VMs. When we started containerizing everything, the people that did that added the separate template. We've followed that pattern since then, but devops wants to move away from dockerize and overriding the entrypoint / command and switch to a purely environment variable driven approach. When we do that we'll probably merge (or remove altogether) the deploy files