Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StaticPassword Problem #3

Open
rdfield opened this issue Jun 2, 2010 · 1 comment
Open

StaticPassword Problem #3

rdfield opened this issue Jun 2, 2010 · 1 comment

Comments

@rdfield
Copy link

rdfield commented Jun 2, 2010

I'm using the standard demo.conf file, with DJabberd::RosterStorage::SQLite commented out, and DJabberd::RosterStorage::InMemoryOnly uncommented.

The HTML file I am using is (other than the usual chrome):

<script>
var conn = new Strophe.Connection("http://192.168.1.150/http-bind/");
conn.connect("[email protected]/random_res_id", "secret", function (status)     {
if (status === Strophe.Status.CONNECTED) {
   alert("Connected");
}});
</script>

According to my understanding of the demo config file only users "partya" and "partyb" should be able to connect, but the current config allows any user in if the supplied password matches the one defined for DJabberd::Authen::StaticPassword. I have checked the djabberd log file and the expected output ("denying, unless allowed:") from DJabberd::Authen::AllowedUsers isn't there.

@alexmv
Copy link
Member

alexmv commented Aug 2, 2010

I just looked into this a bit. This is because multiple auth schemes don't play well with each other; the StaticPassword hooks GetPassword, which means that DJabberd::IQ never gets to checking the CheckClearText hook where AllowedUsers hooked in.

The right fix is to split Auth (like StaticPassword) from Authz (like AllowedUsers); then, ideally, make auth checks be allowed to accept, reject, or decline, and stop on the first accept or reject -- and make authz handlers be able to accept or reject, and any reject bails out with an auth fail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants