[Kea-users] Stork API Key

Eric Graham eric.graham at vantagepnt.com
Tue Dec 13 15:54:22 UTC 2022


Looks like it times out after the default of 24 hours, but can be renewed if you authenticate again.

Defined here: https://gitlab.isc.org/isc-projects/stork/-/blob/aa1036c20dd32eaeaa9675b329d8b704dbeeb718/backend/server/database/session/session_manager.go#L23

Default defined here: https://pkg.go.dev/github.com/alexedwards/scs/v2#SessionManager



Eric Graham

DevOps Specialist

Main: 605.995.1777

Eric.Graham at Vantagepnt.com<mailto:Eric.Graham at Vantagepnt.com>


[cid:0f13ce25-3560-468c-bb93-d2addb327210]


Mitchell | Portland | Colorado Springs | San Antonio | Sioux Falls | Springfield | Charlotte

________________________________
From: Kea-users <kea-users-bounces at lists.isc.org> on behalf of Stefan G. Weichinger <lists at xunil.at>
Sent: Tuesday, December 13, 2022 2:26 AM
To: kea-users at lists.isc.org <kea-users at lists.isc.org>
Subject: Re: [Kea-users] Stork API Key

CAUTION: This email originated outside the organization. Do not click any links or attachments unless you have verified the sender.

Am 12.12.22 um 16:39 schrieb Eric Graham:
> Hi Stefan,
>
> As far as I am aware, there's no token. Send a POST to /sessions and use
> the "session" cookie to authenticate, as so:
>
> ➜ curl -k -c cookie.txt -X POST -H 'Content-Type: application/json'
> https://127.68.45.99/api/sessions -d '{"useremail": "admin",
> "userpassword": "your password here"}'
> {"email":"admin at yourdomain.local","groups":[1],"id":2,"lastname":"Admin","login":"admin","name":"Test Admin"}
>
> ➜ cat cookie.txt
> # Netscape HTTP Cookie File
> # https://curl.se/docs/http-cookies.html
> # This file was generated by libcurl! Edit at your own risk.
>
> #HttpOnly_10.0.7.11     FALSE   /       FALSE   1670945665      session
> jWZUnuCYYhs6seDTKpliwnp4eIWHIA1ObVi_Ior_YYLk
>
> ➜ curl -k -X GET -H 'Content-Type: application/json' -b cookie.txt
> https://127.68.45.99/api/users
> {"items":[{"email":"admin at yourdomain.local","groups":[1],"id":2,"lastname":"Admin","login":"admin","name":"Test Admin"}],"total":1}
>
> ------------------------------------------------------------------------

Great, works here ... does that cookie have a lifetime, does it time out ?

thanks


--
ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.

To unsubscribe visit https://lists.isc.org/mailman/listinfo/kea-users.

Kea-users mailing list
Kea-users at lists.isc.org
https://lists.isc.org/mailman/listinfo/kea-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20221213/adb34f86/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Outlook-5grhxb3j.png
Type: image/png
Size: 7597 bytes
Desc: Outlook-5grhxb3j.png
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20221213/adb34f86/attachment-0001.png>


More information about the Kea-users mailing list