Repository navigation
QuestionWould you please clarify if the desired logic is to wait until the session expiration time for revoking firewall authorization, or should access be revoked immediately upon logout? Currently, the firewall shows DescriptionAfter performing an OIDC logout (POST Reproduction Steps
Debugging
Config:"MaxSessionLifetimeMinutes": 2, |
Replies: 1 comment 1 reply
|
This is a little bit complicated to explain. You are correct that the router/firewall within wag doesnt watch the devices session etcd key. However that isnt actually the way that a device is logged out/deauthorized. That is done by setting the devices wag/internal/router/statemachine.go Line 110 in d1904a0 The
There is no watching of the key to capture case number 3. as the TTL (time to live) on the etcd key is the same as the max session life time that is initialised within the wag device: wag/internal/router/statemachine.go Line 142 in d1904a0 wag/internal/router/firewall.go Line 286 in d1904a0 In short, as you're using an OIDC provider, are you sure it didnt automatically relog you in, there was another discussion you commented on where someone was talking about that. P.S I think for clarities sake, having a watcher in the router for the session key to delete it router side is a good idea |
This is a little bit complicated to explain.
You are correct that the router/firewall within wag doesnt watch the devices session etcd key. However that isnt actually the way that a device is logged out/deauthorized.
That is done by setting the devices
Authorisedtime field to the zero value oftime.Time{}.Which then causes the state machine to deauthorise the device if it was authorized:
wag/internal/router/statemachine.go
Line 110 in d1904a0
The
MarkDeviceSessionEndedfunction deletes an etcd key so that the event based nature of etcd will flow that down to the frontend. The key that it manages…