src/jdk.security.jgss/share/classes/com/sun/security/jgss/ExtendedGSSCredential.java
author bpb
Fri, 12 Jan 2018 11:06:24 -0800
changeset 48461 6a1c3a5e04f3
parent 47216 71c04702a3d5
permissions -rw-r--r--
4358774: Add null InputStream and OutputStream Reviewed-by: alanb, prappo, reinhapa, rriggs
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
14413
e954df027393 6355584: Introduce constrained Kerberos delegation
weijun
parents:
diff changeset
     1
/*
23010
6dadb192ad81 8029235: Update copyright year to match last edit in jdk8 jdk repository for 2013
lana
parents: 20742
diff changeset
     2
 * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
14413
e954df027393 6355584: Introduce constrained Kerberos delegation
weijun
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
e954df027393 6355584: Introduce constrained Kerberos delegation
weijun
parents:
diff changeset
     4
 *
e954df027393 6355584: Introduce constrained Kerberos delegation
weijun
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
e954df027393 6355584: Introduce constrained Kerberos delegation
weijun
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
e954df027393 6355584: Introduce constrained Kerberos delegation
weijun
parents:
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
e954df027393 6355584: Introduce constrained Kerberos delegation
weijun
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
e954df027393 6355584: Introduce constrained Kerberos delegation
weijun
parents:
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
e954df027393 6355584: Introduce constrained Kerberos delegation
weijun
parents:
diff changeset
    10
 *
e954df027393 6355584: Introduce constrained Kerberos delegation
weijun
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
e954df027393 6355584: Introduce constrained Kerberos delegation
weijun
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
e954df027393 6355584: Introduce constrained Kerberos delegation
weijun
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
e954df027393 6355584: Introduce constrained Kerberos delegation
weijun
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
e954df027393 6355584: Introduce constrained Kerberos delegation
weijun
parents:
diff changeset
    15
 * accompanied this code).
e954df027393 6355584: Introduce constrained Kerberos delegation
weijun
parents:
diff changeset
    16
 *
e954df027393 6355584: Introduce constrained Kerberos delegation
weijun
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
e954df027393 6355584: Introduce constrained Kerberos delegation
weijun
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
e954df027393 6355584: Introduce constrained Kerberos delegation
weijun
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
e954df027393 6355584: Introduce constrained Kerberos delegation
weijun
parents:
diff changeset
    20
 *
e954df027393 6355584: Introduce constrained Kerberos delegation
weijun
parents:
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
e954df027393 6355584: Introduce constrained Kerberos delegation
weijun
parents:
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
e954df027393 6355584: Introduce constrained Kerberos delegation
weijun
parents:
diff changeset
    23
 * questions.
e954df027393 6355584: Introduce constrained Kerberos delegation
weijun
parents:
diff changeset
    24
 */
e954df027393 6355584: Introduce constrained Kerberos delegation
weijun
parents:
diff changeset
    25
e954df027393 6355584: Introduce constrained Kerberos delegation
weijun
parents:
diff changeset
    26
package com.sun.security.jgss;
e954df027393 6355584: Introduce constrained Kerberos delegation
weijun
parents:
diff changeset
    27
e954df027393 6355584: Introduce constrained Kerberos delegation
weijun
parents:
diff changeset
    28
import org.ietf.jgss.*;
e954df027393 6355584: Introduce constrained Kerberos delegation
weijun
parents:
diff changeset
    29
e954df027393 6355584: Introduce constrained Kerberos delegation
weijun
parents:
diff changeset
    30
/**
e954df027393 6355584: Introduce constrained Kerberos delegation
weijun
parents:
diff changeset
    31
 * The extended GSSCredential interface for supporting additional
e954df027393 6355584: Introduce constrained Kerberos delegation
weijun
parents:
diff changeset
    32
 * functionalities not defined by {@code org.ietf.jgss.GSSCredential}.
e954df027393 6355584: Introduce constrained Kerberos delegation
weijun
parents:
diff changeset
    33
 * @since 1.8
e954df027393 6355584: Introduce constrained Kerberos delegation
weijun
parents:
diff changeset
    34
 */
e954df027393 6355584: Introduce constrained Kerberos delegation
weijun
parents:
diff changeset
    35
public interface ExtendedGSSCredential extends GSSCredential {
26629
3b9ed8175488 8042900: Allow com.sun.security.jgss to be in different module than org.ietf.jgss
weijun
parents: 25859
diff changeset
    36
14413
e954df027393 6355584: Introduce constrained Kerberos delegation
weijun
parents:
diff changeset
    37
    /**
e954df027393 6355584: Introduce constrained Kerberos delegation
weijun
parents:
diff changeset
    38
     * Impersonates a principal. In Kerberos, this can be implemented
e954df027393 6355584: Introduce constrained Kerberos delegation
weijun
parents:
diff changeset
    39
     * using the Microsoft S4U2self extension.
e954df027393 6355584: Introduce constrained Kerberos delegation
weijun
parents:
diff changeset
    40
     * <p>
e954df027393 6355584: Introduce constrained Kerberos delegation
weijun
parents:
diff changeset
    41
     * A {@link GSSException#NO_CRED GSSException.NO_CRED} will be thrown if the
e954df027393 6355584: Introduce constrained Kerberos delegation
weijun
parents:
diff changeset
    42
     * impersonation fails. A {@link GSSException#FAILURE GSSException.FAILURE}
e954df027393 6355584: Introduce constrained Kerberos delegation
weijun
parents:
diff changeset
    43
     * will be  thrown if the impersonation method is not available to this
e954df027393 6355584: Introduce constrained Kerberos delegation
weijun
parents:
diff changeset
    44
     * credential object.
e954df027393 6355584: Introduce constrained Kerberos delegation
weijun
parents:
diff changeset
    45
     * @param name the name of the principal to impersonate
e954df027393 6355584: Introduce constrained Kerberos delegation
weijun
parents:
diff changeset
    46
     * @return a credential for that principal
e954df027393 6355584: Introduce constrained Kerberos delegation
weijun
parents:
diff changeset
    47
     * @throws GSSException  containing the following
e954df027393 6355584: Introduce constrained Kerberos delegation
weijun
parents:
diff changeset
    48
     * major error codes:
e954df027393 6355584: Introduce constrained Kerberos delegation
weijun
parents:
diff changeset
    49
     *   {@link GSSException#NO_CRED GSSException.NO_CRED}
e954df027393 6355584: Introduce constrained Kerberos delegation
weijun
parents:
diff changeset
    50
     *   {@link GSSException#FAILURE GSSException.FAILURE}
e954df027393 6355584: Introduce constrained Kerberos delegation
weijun
parents:
diff changeset
    51
     */
e954df027393 6355584: Introduce constrained Kerberos delegation
weijun
parents:
diff changeset
    52
    public GSSCredential impersonate(GSSName name) throws GSSException;
e954df027393 6355584: Introduce constrained Kerberos delegation
weijun
parents:
diff changeset
    53
}