Skip to content

Kerberos Integrated auth - #612

Closed
Suraiya-Hameed wants to merge 12 commits into
tediousjs:masterfrom
Suraiya-Hameed:integrated_Auth
Closed

Suraiya-Hameed wants to merge 12 commits into
tediousjs:masterfrom
Suraiya-Hameed:integrated_Auth

Conversation

@Suraiya-Hameed

@Suraiya-Hameed Suraiya-Hameed commented Sep 14, 2017 •

Copy link
Copy Markdown
Member

Tests to be added soon.

@Suraiya-Hameed

Copy link
Copy Markdown
Member Author

@tvrprasad @arthurschreiber Can you review it when possible?

@arthurschreiber

Copy link
Copy Markdown
Collaborator

Heya @v-suhame! 👋

I just opened #624, which proposes a better API for adding authentication providers (like the Kerberos provider you are working on here). Please check it out and let me know what you think! ❤️

Comment thread package.json
"sprintf": "0.1.5",
"sspi-client": "^0.1.0"
"sspi-client": "^0.1.0",
"node-kerberos": "^0.0.25"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mentioned in #624, I don't think having all these different libraries be dependencies of tedious is a scalable approach.

Comment thread src/connection.js

// clean kerberos security context if exists
if (this.kerberos && this.context) {
this.kerberos.authGSSClientClean(this.context, () => { cleanConnection(); });

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about cleaning the kerberos context right after the security handshake was performed successfully? 🤔

Comment thread src/connection.js
}
}
},
SENT_LOGIN7_WITH_KERBEROS: {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The state machine is starting to get really complicated. Do you think kerberos authentication could be implemented without adding a new state? I know that there is also a special state for NTLM authentication defined, but while working on #624, I was thinking if we maybe could get rid of authentication specific states somehow. 🤔

Comment thread src/connection.js

processLogin7KerberosResponse() {
if (this.loggedIn) {
return this.dispatchEvent('loggedIn');

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I'm missing something, but is this really the right location for this call? Where is this.loggedIn set to true for kerberos authentication? 🤔

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I think I figured out where this happens. 😓

Comment thread src/connection.js
this.sspiClientResponsePending = false;

// clear the ntlmpacket
delete this.ntlmpacketBuffer;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deleting properties has negative performance implications in V8, if I remember correctly. 🤔

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure, I'll double check that.

@Suraiya-Hameed

Copy link
Copy Markdown
Member Author

@arthurschreiber Thanks for reviewing it :) I'll keep this PR open for now, will make the necessary changes after pluggable-auth-providers gets merged.

@Fadoli

Fadoli commented Jan 28, 2019

Copy link
Copy Markdown

Hey just asking, not work is planned on this anymore ? (since the pluggable auth providers is okay ish ?)

@David-Engel

Copy link
Copy Markdown
Member

@Fadoli Changes from this PR look to be incorporated in #624 which is still open.

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

Successfully merging this pull request may close these issues.

4 participants