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

Code review of ts jgss jdk12 #1

Draft
wants to merge 25 commits into
base: jdk12-master
Choose a base branch
from
Draft

Code review of ts jgss jdk12 #1

wants to merge 25 commits into from

Commits on Sep 26, 2018

  1. Add missing dbgsysGetLastErrorString()

    Viktor Dukhovni authored and nicowilliams committed Sep 26, 2018
    Configuration menu
    Copy the full SHA
    0b47709 View commit details
    Browse the repository at this point in the history

Commits on Oct 2, 2018

  1. JGSS: Fix cut/paste error in NativeUtil.c

    Viktor Dukhovni authored and nicowilliams committed Oct 2, 2018
    Configuration menu
    Copy the full SHA
    e7b31c2 View commit details
    Browse the repository at this point in the history
  2. Fix error handling in GSSLibStub

    Also improve object size handling in NativeUtil.
    Viktor Dukhovni authored and nicowilliams committed Oct 2, 2018
    Configuration menu
    Copy the full SHA
    003d82b View commit details
    Browse the repository at this point in the history
  3. Implement String to gss_buffer_t import

    Viktor Dukhovni authored and nicowilliams committed Oct 2, 2018
    Configuration menu
    Copy the full SHA
    0191c79 View commit details
    Browse the repository at this point in the history
  4. Revert initGSSBuffer to JDK7 non-copy behaviour

    Viktor Dukhovni authored and nicowilliams committed Oct 2, 2018
    Configuration menu
    Copy the full SHA
    f8d26b3 View commit details
    Browse the repository at this point in the history
  5. Fix loss of GSS_S_FAILURE major status in importContext

    Viktor Dukhovni authored and nicowilliams committed Oct 2, 2018
    Configuration menu
    Copy the full SHA
    2a9e744 View commit details
    Browse the repository at this point in the history
  6. Add actual mechanism to native GSSNameElement state

    Viktor Dukhovni authored and nicowilliams committed Oct 2, 2018
    Configuration menu
    Copy the full SHA
    e2ad2c5 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    63dcbe5 View commit details
    Browse the repository at this point in the history
  8. Add createCredential() with password

    Also avoid memory allocation in newGSSOIDSet() renamed to makeGSSOIDset()
    which now takes a singleton set argument and either assigns the requested
    OID or with SPNEGO returns a static list of all the supported mechs. With
    this we no longer need deleteGSSOIDSet().
    nicowilliams committed Oct 2, 2018
    Configuration menu
    Copy the full SHA
    a742c8e View commit details
    Browse the repository at this point in the history
  9. JGSS: Don't dispose() of creds too eagerly

    We must not dispose() of any credential handle passed to the
    NativeGSSContext() constructor.  But we must dispose() of credentials
    that are acquired in NativeGSSContext.
    
    This is very important because the JVM does not know about the size of
    the JNI credential objects, so it doesn't readily recognize memory
    pressure from them, leading to memory pressure issues in SASL and GSS
    server applications.
    nicowilliams committed Oct 2, 2018
    Configuration menu
    Copy the full SHA
    d975a3d View commit details
    Browse the repository at this point in the history
  10. Fix SpNego multi-round-trip bug

    There is only one token that we can extract an actual mechanism OID from
    in the SPNEGO case when the native GSS library doesn't provide that
    (though it should) in the API.  If the SPNEGO exchange ends up requiring
    more than two tokens, then the previous code failed to establish a
    security context.
    
    Also, never raise if we cannot get an actual mech OID from SPNEGO
    tokens.
    nicowilliams committed Oct 2, 2018
    Configuration menu
    Copy the full SHA
    561e7f4 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    5840bfd View commit details
    Browse the repository at this point in the history
  12. ServicePermission empty realm support

    Also use empty realm as wildcard for krbtgt names
    nicowilliams committed Oct 2, 2018
    Configuration menu
    Copy the full SHA
    ac1f706 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    837a750 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    173c04b View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    b7cd095 View commit details
    Browse the repository at this point in the history
  16. Add GssLoginModule

    This module is to be used for GSS applications in preference to
    Krb5LoginModule, especially when using the native GSS provider.
    nicowilliams committed Oct 2, 2018
    Configuration menu
    Copy the full SHA
    89341f8 View commit details
    Browse the repository at this point in the history
  17. Engage GssLoginModule (only) when native=true

    Also don't force same name for acceptor and initiator.
    nicowilliams committed Oct 2, 2018
    Configuration menu
    Copy the full SHA
    98f952f View commit details
    Browse the repository at this point in the history
  18. Krb5LoginModule cleanup

    Add commentary about native in Krb5LoginModule
    nicowilliams committed Oct 2, 2018
    Configuration menu
    Copy the full SHA
    78a7cac View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    5a494b0 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    ac27524 View commit details
    Browse the repository at this point in the history
  21. FIXME commentary

    nicowilliams committed Oct 2, 2018
    Configuration menu
    Copy the full SHA
    90d3097 View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    5a541ee View commit details
    Browse the repository at this point in the history
  23. JGSS: Simplify context permissions checks

    We were reacquiring the initiator/acceptor credential upon security
    context full establishment in order to indirectly perform a permission
    check on the srcName/targName once we find out what they are.  But this
    is just one more way to end up failing, which happens with Heimdal when
    using SPNEGO because we ask to acquire a Kerberos credentials using a
    SPNEGO MN and that fails.
    
    Also, there was a security bug here: if the permission check fails then
    we raise, but if the application already has a context handle, then it
    can use it anyways if it catches the exception!  The fix for this is to
    dispose() when the permission check fails.
    nicowilliams committed Oct 2, 2018
    Configuration menu
    Copy the full SHA
    192cc47 View commit details
    Browse the repository at this point in the history
  24. Dispose of delegated cred handles early

    Native objects are memory icebergs: they are much larger than the JVM
    knows, so the GC might not dispose of them soon enough.
    nicowilliams committed Oct 2, 2018
    Configuration menu
    Copy the full SHA
    16f33b3 View commit details
    Browse the repository at this point in the history