bringhurst / nginx-mod-auth-kerb

An nginx module to enable the use of SPNEGO, GSSAPI, and Kerberos for HTTP SSO authentication.
Other
37 stars 8 forks source link

ubuntu compile #4

Closed peterhorvath closed 7 years ago

peterhorvath commented 12 years ago

Hi,

I am trying to compile this on Ubuntu LTS 10.04.

But always getting this error:

/usr/src/nginx-mod-auth-kerb/ngx_http_auth_sso_module.c:15:27: error: gssapi/gssapi.h: No such file or directory /usr/src/nginx-mod-auth-kerb/ngx_http_auth_sso_module.c:17:18: error: krb5.h: No such file or directory /usr/src/nginx-mod-auth-kerb/ngx_http_auth_sso_module.c:39: error: expected declaration specifiers or ‘...’ before ‘OM_uint32’ /usr/src/nginx-mod-auth-kerb/ngx_http_auth_sso_module.c: In function ‘get_gss_error’: /usr/src/nginx-mod-auth-kerb/ngx_http_auth_sso_module.c:42: error: ‘OM_uint32’ undeclared (first use in this function) /usr/src/nginx-mod-auth-kerb/ngx_http_auth_sso_module.c:42: error: (Each undeclared identifier is reported only once /usr/src/nginx-mod-auth-kerb/ngx_http_auth_sso_module.c:42: error: for each function it appears in.) /usr/src/nginx-mod-auth-kerb/ngx_http_auth_sso_module.c:42: error: expected ‘;’ before ‘maj_stat’ /usr/src/nginx-mod-auth-kerb/ngx_http_auth_sso_module.c:43: error: expected ‘;’ before ‘msg_ctx’ /usr/src/nginx-mod-auth-kerb/ngx_http_auth_sso_module.c:44: error: ‘gss_buffer_desc’ undeclared (first use in this function) /usr/src/nginx-mod-auth-kerb/ngx_http_auth_sso_module.c:44: error: expected ‘;’ before ‘status_string’ /usr/src/nginx-mod-auth-kerb/ngx_http_auth_sso_module.c:53: error: ‘maj_stat’ undeclared (first use in this function) /usr/src/nginx-mod-auth-kerb/ngx_http_auth_sso_module.c:53: error: ‘min_stat’ undeclared (first use in this function) /usr/src/nginx-mod-auth-kerb/ngx_http_auth_sso_module.c:54: error: ‘error_status’ undeclared (first use in this function) /usr/src/nginx-mod-auth-kerb/ngx_http_auth_sso_module.c:55: error: ‘GSS_C_MECH_CODE’ undeclared (first use in this function) /usr/src/nginx-mod-auth-kerb/ngx_http_auth_sso_module.c:56: error: ‘GSS_C_NO_OID’ undeclared (first use in this function) /usr/src/nginx-mod-auth-kerb/ngx_http_auth_sso_module.c:57: error: ‘msg_ctx’ undeclared (first use in this function) /usr/src/nginx-mod-auth-kerb/ngx_http_auth_sso_module.c:58: error: ‘status_string’ undeclared (first use in this function) /usr/src/nginx-mod-auth-kerb/ngx_http_auth_sso_module.c: In function ‘ngx_http_auth_sso_auth_user_gss’: /usr/src/nginx-mod-auth-kerb/ngx_http_auth_sso_module.c:423: error: ‘krb5_context’ undeclared (first use in this function) /usr/src/nginx-mod-auth-kerb/ngx_http_auth_sso_module.c:423: error: expected ‘;’ before ‘krb_ctx’ /usr/src/nginx-mod-auth-kerb/ngx_http_auth_sso_module.c:438: error: ‘OM_uint32’ undeclared (first use in this function) /usr/src/nginx-mod-auth-kerb/ngx_http_auth_sso_module.c:438: error: expected ‘;’ before ‘major_status’ /usr/src/nginx-mod-auth-kerb/ngx_http_auth_sso_module.c:439: error: ‘gss_buffer_desc’ undeclared (first use in this function) /usr/src/nginx-mod-auth-kerb/ngx_http_auth_sso_module.c:439: error: expected ‘;’ before ‘service’ /usr/src/nginx-mod-auth-kerb/ngx_http_auth_sso_module.c:440: error: ‘gss_name_t’ undeclared (first use in this function) /usr/src/nginx-mod-auth-kerb/ngx_http_auth_sso_module.c:440: error: expected ‘;’ before ‘my_gss_name’ /usr/src/nginx-mod-auth-kerb/ngx_http_auth_sso_module.c:441: error: ‘gss_cred_id_t’ undeclared (first use in this function) /usr/src/nginx-mod-auth-kerb/ngx_http_auth_sso_module.c:441: error: expected ‘;’ before ‘my_gss_creds’ /usr/src/nginx-mod-auth-kerb/ngx_http_auth_sso_module.c:442: error: expected ‘;’ before ‘input_token’ /usr/src/nginx-mod-auth-kerb/ngx_http_auth_sso_module.c:443: error: ‘gss_ctx_id_t’ undeclared (first use in this function) /usr/src/nginx-mod-auth-kerb/ngx_http_auth_sso_module.c:443: error: expected ‘;’ before ‘gss_context’ /usr/src/nginx-mod-auth-kerb/ngx_http_auth_sso_module.c:444: error: expected ‘;’ before ‘client_name’ /usr/src/nginx-mod-auth-kerb/ngx_http_auth_sso_module.c:445: error: expected ‘;’ before ‘output_token’ /usr/src/nginx-mod-auth-kerb/ngx_http_auth_sso_module.c:446: error: expected ‘;’ before ‘ret_flags’ /usr/src/nginx-mod-auth-kerb/ngx_http_auth_sso_module.c:447: error: expected ‘;’ before ‘delegated_cred’ /usr/src/nginx-mod-auth-kerb/ngx_http_auth_sso_module.c:459: error: ‘krb_ctx’ undeclared (first use in this function) /usr/src/nginx-mod-auth-kerb/ngx_http_auth_sso_module.c:476: error: ‘service’ undeclared (first use in this function) /usr/src/nginx-mod-auth-kerb/ngx_http_auth_sso_module.c:489: error: ‘major_status’ undeclared (first use in this function) /usr/src/nginx-mod-auth-kerb/ngx_http_auth_sso_module.c:489: error: ‘minor_status’ undeclared (first use in this function) /usr/src/nginx-mod-auth-kerb/ngx_http_auth_sso_module.c:490: error: ‘GSS_C_NT_HOSTBASED_SERVICE’ undeclared (first use in this function) /usr/src/nginx-mod-auth-kerb/ngx_http_auth_sso_module.c:490: error: ‘my_gss_name’ undeclared (first use in this function) /usr/src/nginx-mod-auth-kerb/ngx_http_auth_sso_module.c:492: error: too many arguments to function ‘get_gss_error’ /usr/src/nginx-mod-auth-kerb/ngx_http_auth_sso_module.c:503: error: ‘GSS_C_INDEFINITE’ undeclared (first use in this function) /usr/src/nginx-mod-auth-kerb/ngx_http_auth_sso_module.c:504: error: ‘GSS_C_NO_OID_SET’ undeclared (first use in this function) /usr/src/nginx-mod-auth-kerb/ngx_http_auth_sso_module.c:505: error: ‘GSS_C_ACCEPT’ undeclared (first use in this function) /usr/src/nginx-mod-auth-kerb/ngx_http_auth_sso_module.c:506: error: ‘my_gss_creds’ undeclared (first use in this function) /usr/src/nginx-mod-auth-kerb/ngx_http_auth_sso_module.c:510: error: too many arguments to function ‘get_gss_error’ /usr/src/nginx-mod-auth-kerb/ngx_http_auth_sso_module.c:520: error: ‘input_token’ undeclared (first use in this function) /usr/src/nginx-mod-auth-kerb/ngx_http_auth_sso_module.c:562: error: ‘gss_context’ undeclared (first use in this function) /usr/src/nginx-mod-auth-kerb/ngx_http_auth_sso_module.c:565: error: ‘GSS_C_NO_CHANNEL_BINDINGS’ undeclared (first use in this function) /usr/src/nginx-mod-auth-kerb/ngx_http_auth_sso_module.c:566: error: ‘client_name’ undeclared (first use in this function) /usr/src/nginx-mod-auth-kerb/ngx_http_auth_sso_module.c:568: error: ‘output_token’ undeclared (first use in this function) /usr/src/nginx-mod-auth-kerb/ngx_http_auth_sso_module.c:569: error: ‘ret_flags’ undeclared (first use in this function) /usr/src/nginx-mod-auth-kerb/ngx_http_auth_sso_module.c:571: error: ‘delegated_cred’ undeclared (first use in this function) /usr/src/nginx-mod-auth-kerb/ngx_http_auth_sso_module.c:598: error: ‘minor_status2’ undeclared (first use in this function) /usr/src/nginx-mod-auth-kerb/ngx_http_auth_sso_module.c:627: error: ‘GSS_S_CONTINUE_NEEDED’ undeclared (first use in this function) /usr/src/nginx-mod-auth-kerb/ngx_http_auth_sso_module.c:635: error: ‘GSS_C_REPLAY_FLAG’ undeclared (first use in this function) /usr/src/nginx-mod-auth-kerb/ngx_http_auth_sso_module.c:635: error: ‘GSS_C_SEQUENCE_FLAG’ undeclared (first use in this function) /usr/src/nginx-mod-auth-kerb/ngx_http_auth_sso_module.c:653: error: too many arguments to function ‘get_gss_error’ /usr/src/nginx-mod-auth-kerb/ngx_http_auth_sso_module.c:689: error: ‘GSS_C_NO_CREDENTIAL’ undeclared (first use in this function) /usr/src/nginx-mod-auth-kerb/ngx_http_auth_sso_module.c:705: error: ‘GSS_C_NO_NAME’ undeclared (first use in this function) /usr/src/nginx-mod-auth-kerb/ngx_http_auth_sso_module.c:708: error: ‘GSS_C_NO_CONTEXT’ undeclared (first use in this function) /usr/src/nginx-mod-auth-kerb/ngx_http_auth_sso_module.c:709: error: ‘GSS_C_NO_BUFFER’ undeclared (first use in this function) make[3]: * [objs/addon/nginx-mod-auth-kerb/ngx_http_auth_sso_module.o] Error 1 make[3]: Leaving directory /usr/src/nginx-1.2.2' make[2]: *** [build] Error 2 make[2]: Leaving directory/usr/src/nginx-1.2.2' dh_auto_build: make -j1 returned exit code 2 make[1]: *\ [override_dh_auto_build] Error 2 make[1]: Leaving directory `/usr/src/nginx-1.2.2' make: * [build] Error 2 dpkg-buildpackage: error: debian/rules build gave error exit status 2

any idea

bringhurst commented 12 years ago

It looks like you're missing krb5 headers. Maybe try this:

sudo apt-get install libkrb5-dev

peterhorvath commented 12 years ago

good idea checked the normal kerberos library but not the dev ---> stupid me.

this is the continue:

/usr/bin/ld: cannot find -lspnegohelp collect2: ld returned 1 exit status make[3]: * [objs/nginx] Error 1 make[3]: Leaving directory /usr/src/nginx-1.2.2' make[2]: *** [build] Error 2 make[2]: Leaving directory/usr/src/nginx-1.2.2' dh_auto_build: make -j1 returned exit code 2 make[1]: *\ [override_dh_auto_build] Error 2 make[1]: Leaving directory `/usr/src/nginx-1.2.2' make: * [build] Error 2 dpkg-buildpackage: error: debian/rules build gave error exit status 2

bringhurst commented 12 years ago

Hmm, you might need to add libspnegohelp.so to your LD_LIBRARY_PATH. Maybe try this:

export LD_LIBRARY_PATH=/usr/src/nginx-mod-auth-kerb/spnegohelp:$LD_LIBRARY_PATH
export LD_RUN_PATH=/usr/src/nginx-mod-auth-kerb/spnegohelp:$LD_RUN_PATH

This nginx module is a bit hacked together (as you probably already know). I haven't looked at it in quite some time, hopefully it works for you.

indrekj commented 12 years ago

I have same problem:

/usr/bin/ld: cannot find -lspnegohelp
collect2: ld returned 1 exit status
make[1]: *** [objs/nginx] Error 1

Changing LD_ paths didn't work.

@peterhorvath did you find a solution?

peterhorvath commented 12 years ago

We've decided to not use this module. I've tried everything and even more and nothing worked.

sorry

On 20 September 2012 21:21, Indrek Juhkam notifications@github.com wrote:

I have same problem:

/usr/bin/ld: cannot find -lspnegohelp collect2: ld returned 1 exit status make[1]: *\ [objs/nginx] Error 1

Changing LD_ paths didn't work.

@peterhorvath https://github.com/peterhorvath did you find a solution?

— Reply to this email directly or view it on GitHubhttps://github.com/fintler/nginx-mod-auth-kerb/issues/4#issuecomment-8744204.

indrekj commented 12 years ago

@peterhorvath Okay. What module did you use then? Something for Apache instead?

peterhorvath commented 12 years ago

Yeah we went with apache2 kerberos.

On 20 September 2012 21:49, Indrek Juhkam notifications@github.com wrote:

@peterhorvath https://github.com/peterhorvath Okay. What module did you use then? Something for Apache instead?

— Reply to this email directly or view it on GitHubhttps://github.com/fintler/nginx-mod-auth-kerb/issues/4#issuecomment-8745034.

indrekj commented 12 years ago

Okay, thanks.

claptimes5 commented 11 years ago

After much aggravation, I was able to get this to compile. For posterity, this worked by by copying

libspnegohelp.a and libspnegohelp.so to my /usr/local/lib folder.

bhanu456 commented 9 years ago

Hi claptimes5,

where can I get this libspnegohelp.a and libspnegohelp.so files ?

Regards, Bhanu.

claptimes5 commented 9 years ago

I'm pretty sure running make in spnegohelp should do that.

dolohow commented 8 years ago

Just invoke make with LIBRARY_PATH environment variable so the linker can find libspnegohelp and while in run time the same, but LD_LIBRARY_PATH.