Dynamic authentication with an asyncio session

#1

Hi everyone,

I’m looking for ways to keep the entirety of my code-base written using asyncio.

Currently, I’m blocked due to dynamic authenticators.

The only way to run an ApplicationSession pre-authed (since it is the authenticator itself), that I’m aware of, is to run it side-by-side with the router. This, if I understand correctly, means that the component has to be written with Twisted.

Is there any way I could use a dynamic authenticator written using asyncio, or should I give up the idea?

Thanks,

Johnny

0 Likes

#2

Well, it would seem that I’ve come to a satisfactory solution.

I haven’t realized that the authentication is on the transport level. This means that I can have a separate transport for authenticating authenticators statically.

This even gives me greater control, as I can control the network access to a particular transport separately from the public one.

So, to recap, I’ve got a public transport that uses dynamic auth, and an internal one that listens only on the loopback interface and handles backend auth.

I’m still curious though, is there anything I should be concerned about with this setup?

···

On Monday, January 2, 2017 at 1:14:08 AM UTC+1, jrocketfingers wrote:

Hi everyone,

I’m looking for ways to keep the entirety of my code-base written using asyncio.

Currently, I’m blocked due to dynamic authenticators.

The only way to run an ApplicationSession pre-authed (since it is the authenticator itself), that I’m aware of, is to run it side-by-side with the router. This, if I understand correctly, means that the component has to be written with Twisted.

Is there any way I could use a dynamic authenticator written using asyncio, or should I give up the idea?

Thanks,

Johnny

0 Likes

#3

I was going to post a reply to this end, but it seems you made the connection yourself :slight_smile:

In my cases I uses a local socket connection for auth as it avoids the overhead of a loopback TCP connection (Of which there is some)

···

On Monday, 2 January 2017 16:13:27 UTC+2, jrocketfingers wrote:

Well, it would seem that I’ve come to a satisfactory solution.

I haven’t realized that the authentication is on the transport level. This means that I can have a separate transport for authenticating authenticators statically.

This even gives me greater control, as I can control the network access to a particular transport separately from the public one.

So, to recap, I’ve got a public transport that uses dynamic auth, and an internal one that listens only on the loopback interface and handles backend auth.

I’m still curious though, is there anything I should be concerned about with this setup?

On Monday, January 2, 2017 at 1:14:08 AM UTC+1, jrocketfingers wrote:

Hi everyone,

I’m looking for ways to keep the entirety of my code-base written using asyncio.

Currently, I’m blocked due to dynamic authenticators.

The only way to run an ApplicationSession pre-authed (since it is the authenticator itself), that I’m aware of, is to run it side-by-side with the router. This, if I understand correctly, means that the component has to be written with Twisted.

Is there any way I could use a dynamic authenticator written using asyncio, or should I give up the idea?

Thanks,

Johnny

0 Likes

#4

@jrocketfingers, i have such a [mini] beast. my authenticator.py is launched via the crossbar router as a trusted session. all inbound connections from client.py type things will be redirected into the authenticator session for dynamic approval. all my code is asyncio, none of it is twisted.

ping me if you’re stuck.

-d

···

On Sunday, January 1, 2017 at 7:14:08 PM UTC-5, jrocketfingers wrote:

Hi everyone,

I’m looking for ways to keep the entirety of my code-base written using asyncio.

Currently, I’m blocked due to dynamic authenticators.

The only way to run an ApplicationSession pre-authed (since it is the authenticator itself), that I’m aware of, is to run it side-by-side with the router. This, if I understand correctly, means that the component has to be written with Twisted.

0 Likes