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

Get auth token from cookie #148

Merged
merged 1 commit into from
May 20, 2024
Merged

Get auth token from cookie #148

merged 1 commit into from
May 20, 2024

Conversation

MrCreosote
Copy link
Member

$ 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
}

```
$ 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
}
```
@MrCreosote MrCreosote requested a review from Xiangs18 May 16, 2024 20:45
Copy link

codecov bot commented May 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

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

Additional details and impacted files
@@             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              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment on lines +13 to +14
mongodb_host: mongo:27017
mongodb_database: dc_blobstore_test
Copy link
Collaborator

@Xiangs18 Xiangs18 May 17, 2024

Choose a reason for hiding this comment

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

huh, these 2 were not updated? I assume they should map to whatever in deployment.cfg.templ.

Copy link
Member Author

@MrCreosote MrCreosote May 18, 2024

Choose a reason for hiding this comment

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

The compose file only worked because the default value for mongodb_host in the config template is ci-mongo. When I changed that to just mongo in the compose file the server couldn't connect and I discovered these were wrong

@Xiangs18
Copy link
Collaborator

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

@MrCreosote
Copy link
Member Author

MrCreosote commented May 18, 2024

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

@MrCreosote MrCreosote merged commit b6b8a3a into develop May 20, 2024
12 checks passed
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.

2 participants