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

Add tests for the server side API #30

Open
behackett opened this issue Feb 12, 2019 · 7 comments
Open

Add tests for the server side API #30

behackett opened this issue Feb 12, 2019 · 7 comments

Comments

@behackett
Copy link
Member

Now that we have a server side API (added in #20) we need to add tests for it. Preferably, the client and server sides can start testing one another, removing the current MongoDB specific test suite.

@behackett behackett added this to the 0.8.0 milestone Feb 12, 2019
@behackett
Copy link
Member Author

@wokis can you provide some hints for testing the server side API? Particularly any configuration changes you had to make to the dev machine, like running setspn to configure the server principal name, etc.

@behackett
Copy link
Member Author

I noticed that the spn passed to authGSSServerInit isn't actually used anywhere. Looking at other implementations, it seems that the spn should be passed to the principal field in AcquireCredentialsHandle (unlike on the client side where that parameter doesn't do anything at all). When using the code as provided I can test the client and server against one another, but the step functions never return AUTH_GSS_COMPLETE and eventually the server step function raises "The logon attempt failed". After changing the code to pass the spn, authGSSServerInit fails with "No credentials are available in the security package". I assume that's because I don't have the spn configured using setspn.

@Yrlish
Copy link

Yrlish commented May 29, 2019

@behackett I would really appreciate if 0.8 got released soon because I need the features that got added in this release.

This seems to be the only issue left in the milestone for 0.8.

@behackett
Copy link
Member Author

@Yrlish what features were added that you need?

@Yrlish
Copy link

Yrlish commented May 29, 2019

The server side stuff

@behackett
Copy link
Member Author

Good to hear. As you can probably tell from this ticket I have no environment to test the server side code in. If you can confirm that it works for you I'll release it as experimental.

@behackett behackett removed this from the 0.8.0 milestone May 29, 2019
@codeape2
Copy link

codeape2 commented Jun 11, 2019

How would a dev machine be set up to be able to test the server-side stuff?

I currently have a Windows 10 machine joined to a AD domain. I have local admin on the Windows 10 machine. I do not have admin access to AD.

setspn -L gives the following output:

> setspn -L %COMPUTERNAME%
Registered ServicePrincipalNames for CN=...:
        WSMAN/hostname.domain.com
        WSMAN/hostname
        CmRcService/hostname
        CmRcService/hostname.domain.com
        TERMSRV/hostname
        TERMSRV/hostname.domain.com
        RestrictedKrbHost/hostname
        HOST/hostname
        RestrictedKrbHost/hostname.domain.com
        HOST/hostname.domain.com

Given my config, would I be able to write and run tests for the server-side stuff? @behackett ? @wokis ?

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

No branches or pull requests

3 participants