pigato icon indicating copy to clipboard operation
pigato copied to clipboard

ZAP

Open leonpegg opened this issue 9 years ago • 6 comments

I know adding zap support is on the roadmap and that zmq-zap is still in the unstable state, But I would like to give a crack at implementing it. I have a basic PLAIN and NULL implementation working and have been using it in production. I would like to know if you have any recommendations for implementation, my current method is to configure the broker as the zap server passing a zap object in the config which also includes the zapHandler and passing zap: true on the config of client and worker. If you have any better suggestions please let me know.

leonpegg avatar Mar 30 '15 08:03 leonpegg

It's sounds a good starting point. For the plain method, shouldn't we pass an object with credentials in the client and worker?

For the broker having a callback to authenticate connections is perfect.

Thank you

prdn avatar Mar 30 '15 22:03 prdn

@prdn Yes I think we should pass them in the client and worker I actually hard coded them in my testing, but we can make it configurable.

I find passed the call back in the configuration clumsy and was wondering if we should have a build in zapHandler that would be overridden before calling start on the broker.

As you guys think its a good start, I'll fork the repo and make the changes.

Do you guys have a coding style guide i need to follow?

leonpegg avatar Mar 31 '15 09:03 leonpegg

@leonpegg Not actually a coding style guide. I should write down something. Could you call "authHandler" instead of "zapHandler" and use the flag "auth" instead of "zap"? Anyway let's start with a sample implementation and then we can work together on that.

Thank you for your help.

prdn avatar Mar 31 '15 09:03 prdn

Thats sounds good I'll polish off some code later today. We also need to discuss how to implement the zap proxy for zap over tcp etc..

leonpegg avatar Mar 31 '15 10:03 leonpegg

Ok basic implementation of zmq-zap is available here.

https://github.com/leonpegg/pigato/commit/585f7fc26bf7f95bef6bd9649b57834986a576a2 i have only done null and plain so far and there is almost no error checking. but there are examples under the auth/{null/plain} folder.

opinions welcome.

leonpegg avatar Apr 01 '15 12:04 leonpegg

fixed examples to so now works https://github.com/leonpegg/pigato/commit/a945ada06d2dcd7fc556041170c9ad241cbe6044

leonpegg avatar Apr 01 '15 12:04 leonpegg