Coder Social home page Coder Social logo

altai-man / cro-ldap Goto Github PK

View Code? Open in Web Editor NEW
9.0 2.0 0.0 194 KB

LDAP support for the Cro library for building distributed systems in Raku

License: Artistic License 2.0

Perl 3.59% Raku 96.41%
perl6 perl6-module ldap raku raku-module cro cro-libraries rakulang

cro-ldap's People

Contributors

altai-man avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

cro-ldap's Issues

StartTLS connections

StartTLS support on new connections is important, especially via Internet.

And that require bindings to something like OpenSSL.

Roadmap

LDAP is relatively vast, so to have The Plan we need to write it first.

Current roadmap document has to be superseded by it.

is this project abadoned

Hey Altai-man, there haven't been much work on this repo. Is this project abadoned?

( I guess I need to go for perl5 mojo for my ldap application :-( )

.bind hangs on credentials failure

This might be a server specific thing but against a work LDAP server (which may or may not be Microsoft ADFS exposed as LDAP,) when an invalid username or password is supplied (it doesn't matter which,) to 'bind' then it simply hangs.

The output with CRO_TRACE=1 is:

[TRACE(anon 1)] Cro::LDAP::MessageSerializer EMIT TCP Message
  30 1d 02 01 01 60 16 02 01 03 04 06 73 74 6f 77  0....`......stow
  65 6a 80 09 42 61 74 62 75 72 67 65 72 a0 00     ej..Batburger..

[TRACE(anon 1)] Cro::TLS::Connector EMIT TCP Message
  30 84 00 00 00 68 02 01 01 61 84 00 00 00 5f 0a  0....h...a...._.
  01 31 04 00 04 58 38 30 30 39 30 33 30 38 3a 20  .1...X80090308: 
  4c 64 61 70 45 72 72 3a 20 44 53 49 44 2d 30 43  LdapErr: DSID-0C
  30 39 30 34 34 37 2c 20 63 6f 6d 6d 65 6e 74 3a  090447, comment:
  20 41 63 63 65 70 74 53 65 63 75 72 69 74 79 43   AcceptSecurityC
  6f 6e 74 65 78 74 20 65 72 72 6f 72 2c 20 64 61  ontext error, da
  74 61 20 35 32 65 2c 20 76 33 38 33 39 00        ta 52e, v3839.

[TRACE(anon 1)] Cro::LDAP::MessageParser QUIT Earlier failure:
 No value '49' found in enum ResultCode
  in method parse at /home/jonathan/.raku/sources/5B77CEDC072C63049FB1CEA5EFC9158615C0EB51 (ASN::Parser) line 263
  in method parse at /home/jonathan/.raku/sources/5B77CEDC072C63049FB1CEA5EFC9158615C0EB51 (ASN::Parser) line 135
  in block  at /home/jonathan/.raku/sources/5B77CEDC072C63049FB1CEA5EFC9158615C0EB51 (ASN::Parser) line 43
  in method parse at /home/jonathan/.raku/sources/5B77CEDC072C63049FB1CEA5EFC9158615C0EB51 (ASN::Parser) line 24
  in method parse at /home/jonathan/.raku/sources/5B77CEDC072C63049FB1CEA5EFC9158615C0EB51 (ASN::Parser) line 126
  in method parse at /home/jonathan/.raku/sources/5B77CEDC072C63049FB1CEA5EFC9158615C0EB51 (ASN::Parser) line 135
  in block  at /home/jonathan/.raku/sources/5B77CEDC072C63049FB1CEA5EFC9158615C0EB51 (ASN::Parser) line 43
  in method parse at /home/jonathan/.raku/sources/5B77CEDC072C63049FB1CEA5EFC9158615C0EB51 (ASN::Parser) line 24
  in method parse at /home/jonathan/.raku/sources/5B77CEDC072C63049FB1CEA5EFC9158615C0EB51 (ASN::Parser) line 19
  in method process at /home/jonathan/.raku/sources/DB3A44EE41FA87797F54EF60DF716A2F3AEB340F (ASN::Parser::Async) line 26
  in block  at /home/jonathan/devel/raku/3rdparty-modules/cro-ldap/lib/Cro/LDAP/MessageParser.pm6 (Cro::LDAP::MessageParser) line 14
  in block  at /home/jonathan/.raku/sources/6596BC506DFCC07D69A93CD79CFD85375655D19E (Cro) line 379
  in block  at /home/jonathan/.raku/sources/8F9CE57B4C9E54F00938F862E837CA40DCD18536 (Cro::TLS) line 92

Final error:
 Type check failed in assignment to $!result-code; expected ResultCode but got Failure (Failure.new(exceptio...)
  in method parse at /home/jonathan/.raku/sources/5B77CEDC072C63049FB1CEA5EFC9158615C0EB51 (ASN::Parser) line 48
  in method parse at /home/jonathan/.raku/sources/5B77CEDC072C63049FB1CEA5EFC9158615C0EB51 (ASN::Parser) line 126
  in method parse at /home/jonathan/.raku/sources/5B77CEDC072C63049FB1CEA5EFC9158615C0EB51 (ASN::Parser) line 135
  in block  at /home/jonathan/.raku/sources/5B77CEDC072C63049FB1CEA5EFC9158615C0EB51 (ASN::Parser) line 43
  in method parse at /home/jonathan/.raku/sources/5B77CEDC072C63049FB1CEA5EFC9158615C0EB51 (ASN::Parser) line 24
  in method parse at /home/jonathan/.raku/sources/5B77CEDC072C63049FB1CEA5EFC9158615C0EB51 (ASN::Parser) line 19
  in method process at /home/jonathan/.raku/sources/DB3A44EE41FA87797F54EF60DF716A2F3AEB340F (ASN::Parser::Async) line 26
  in block  at /home/jonathan/devel/raku/3rdparty-modules/cro-ldap/lib/Cro/LDAP/MessageParser.pm6 (Cro::LDAP::MessageParser) line 14
  in block  at /home/jonathan/.raku/sources/6596BC506DFCC07D69A93CD79CFD85375655D19E (Cro) line 379
  in block  at /home/jonathan/.raku/sources/8F9CE57B4C9E54F00938F862E837CA40DCD18536 (Cro::TLS) line 92

It looks like there are actually two problems, a) it isn't finding the correct enum for returncode (49 does appear to be present in the asn grammar you have,) and b) the error in the parser isn't being propagated so the failure to parse the response leaves it waiting for a response it can parse.

LDAPv3

Mention support for LDAPv3 protocol in documentation.

Also on front page, let users know !

Failure on fresh compilers

===> Testing: Cro::LDAP:ver<0.5.3.1>:auth<github:Altai-man>
[Cro::LDAP] Earlier failures:
[Cro::LDAP]  (HANDLED) Len element to subbuf out of range. Is: -65, should be in 0..191
[Cro::LDAP]   in method process at /home/koto/.rakudobrew/versions/moar-2020.12/install/share/perl6/site/sources/9D80F40F2B6F7C9EAFA80407BD6D23E59CDC6843 (ASN::Parser::Async) line 25
[Cro::LDAP]   in block  at /home/koto/.zef/store/cro-ldap.git/6e1e9ed6882c9c39a23f624c1847af384cf4846b/lib/Cro/LDAP/MessageParser.pm6 (Cro::LDAP::MessageParser) line 14
[Cro::LDAP]   in block  at /home/koto/.rakudobrew/versions/moar-2020.12/install/share/perl6/site/sources/96414B94916763A5BB7A0A23B18D9864ABC50C85 (Cro::TCP) line 53
[Cro::LDAP] Final error:
[Cro::LDAP]  Cannot resolve caller parse(ASN::Parser.new(type...: Failure, :!to-chop, :!debug); none of these signatures match:
[Cro::LDAP]     (ASN::Parser: Blob $input, :$debug, :$mode, :$to-chop = Bool::True, *%_)
[Cro::LDAP]     (ASN::Parser: Buf $input is rw, ASNSequence $type, :$debug, :$mode, *%_)
[Cro::LDAP]     (ASN::Parser: Buf $input is rw, $type where { ... }, :$debug, :$mode, *%_)
[Cro::LDAP]     (ASN::Parser: Buf $input is rw, ASNSetOf $type, :$debug, :$mode, *%_)
[Cro::LDAP]     (ASN::Parser: Buf $input is rw, ASNChoice $choice, :$tag, :$debug, :$mode, *%_)
[Cro::LDAP]     (ASN::Parser: Buf $input is rw, ASNValue $value, :$debug, :$mode, *%_)
[Cro::LDAP]     (ASN::Parser: Buf $input is rw, Int $type where { ... }, :$debug, *%_)
[Cro::LDAP]     (ASN::Parser: Buf $input is rw, ASN::Types::UTF8String $str, :$debug, *%_)
[Cro::LDAP]     (ASN::Parser: Buf $input is rw, $str where { ... }, :$debug, *%_)
[Cro::LDAP]     (ASN::Parser: Buf $input is rw, Bool $bool, :$debug, :$mode, *%_)
[Cro::LDAP]     (ASN::Parser: Buf $input is rw, $enum-type where { ... }, :$debug, :$mode, *%_)
[Cro::LDAP]     (ASN::Parser: Buf $input, ASN-Null $type, :$debug, *%_)
[Cro::LDAP]   in method process at /home/koto/.rakudobrew/versions/moar-2020.12/install/share/perl6/site/sources/9D80F40F2B6F7C9EAFA80407BD6D23E59CDC6843 (ASN::Parser::Async) line 26
[Cro::LDAP]   in block  at /home/koto/.zef/store/cro-ldap.git/6e1e9ed6882c9c39a23f624c1847af384cf4846b/lib/Cro/LDAP/MessageParser.pm6 (Cro::LDAP::MessageParser) line 14
[Cro::LDAP]   in block  at /home/koto/.rakudobrew/versions/moar-2020.12/install/share/perl6/site/sources/96414B94916763A5BB7A0A23B18D9864ABC50C85 (Cro::TCP) line 53

Get SASL support for Perl 6

This is our main issue for getting auth stuff in place.

First idea of how to do it without too much pain is to develop SASL::Cyrus bindings using NativeCall.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.