VirtualBox

Changeset 35203 in vbox


Ignore:
Timestamp:
Dec 16, 2010 5:38:31 PM (14 years ago)
Author:
vboxsync
Message:

SDKRef: chapter for external auth modules.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/manual/en_US/SDKRef.xml

    r34563 r35203  
    423423
    424424        <para>This way you can specify any shared object/dynamic link module
    425         that conforms with the specifications for authentication modules as
    426         laid out in section 9.3 of the VirtualBox User Manual; the web service
    427         uses the same kind of modules as the VirtualBox RDP server.</para>
     425        that conforms with the specifications for VirtualBox external authentication
     426        modules as laid out in section <emphasis role="bold">VRDE authentication</emphasis>
     427        of the VirtualBox User Manual; the web service uses the same kind of modules as the
     428        VirtualBox VRDE server. For technical details on VirtualBox external authentication
     429        modules see <xref linkend="vbox-auth" /></para>
    428430
    429431        <para>By default, after installation, the web service uses the
     
    14531455else:
    14541456    session = mgr.getSessionObject(vbox)
    1455     # one can also start headless session with "vrdp" instead of "gui"
     1457    # one can also start headless session with "headless" instead of "gui"
    14561458    progress = vb.openRemoteSession(session, mach.id, "gui", "")
    14571459    progress.waitForCompletion(-1)
     
    31713173      </sect2>
    31723174    </sect1>
     3175  </chapter>
     3176
     3177  <chapter id="vbox-auth">
     3178    <title>VirtualBox external authentication modules</title>
     3179
     3180    <para>VirtualBox supports arbitrary external modules to perform authentication.
     3181    The module is used when the authentication method is set to "external" for a
     3182    particular VM VRDE access and the library was specified with
     3183    <computeroutput>VBoxManage setproperty vrdeauthlibrary</computeroutput>.
     3184    Web service also use the authentication module which was specified with
     3185    <computeroutput>VBoxManage setproperty websrvauthlibrary</computeroutput>.</para>
     3186
     3187    <para>This library will be loaded by the VM or web service process on demand, i.e.
     3188    when the first remote desktop connection is made by a client or when
     3189    a client that wants to use the web service logs on.</para>
     3190
     3191    <para>External authentication is the most flexible as the external
     3192    handler can both choose to grant access to everyone (like the "null"
     3193    authentication method would) and delegate the request to the guest
     3194    authentication component. When delegating the request to the guest
     3195    component, the handler will still be called afterwards with the option to
     3196    override the result.</para>
     3197
     3198    <para>An authentication library is required to implement exactly one
     3199    entry point:</para>
     3200
     3201    <screen>#include "VBoxAuth.h"
     3202
     3203/**
     3204 * Authentication library entry point.
     3205 *
     3206 * Parameters:
     3207 *
     3208 *   szCaller         The name of the component which calls the library (UTF8).
     3209 *   pUuid            Pointer to the UUID of the accessed virtual machine. Can be NULL.
     3210 *   guestJudgement   Result of the guest authentication.
     3211 *   szUser           User name passed in by the client (UTF8).
     3212 *   szPassword       Password passed in by the client (UTF8).
     3213 *   szDomain         Domain passed in by the client (UTF8).
     3214 *   fLogon           Boolean flag. Indicates whether the entry point is called
     3215 *                    for a client logon or the client disconnect.
     3216 *   clientId         Server side unique identifier of the client.
     3217 *
     3218 * Return code:
     3219 *
     3220 *   AuthResultAccessDenied    Client access has been denied.
     3221 *   AuthResultAccessGranted   Client has the right to use the
     3222 *                             virtual machine.
     3223 *   AuthResultDelegateToGuest Guest operating system must
     3224 *                             authenticate the client and the
     3225 *                             library must be called again with
     3226 *                             the result of the guest
     3227 *                             authentication.
     3228 *
     3229 * Note: When 'fLogon' is 0, only pszCaller, pUuid and clientId are valid and the return
     3230 *       code is ignored.
     3231 */
     3232AuthResult AUTHCALL AuthEntry(
     3233    const char *szCaller,
     3234    PAUTHUUID pUuid,
     3235    AuthGuestJudgement guestJudgement,
     3236    const char *szUser,
     3237    const char *szPassword
     3238    const char *szDomain
     3239    int fLogon,
     3240    unsigned clientId)
     3241{
     3242    /* Process request against your authentication source of choice. */
     3243    // if (authSucceeded(...))
     3244    //     return AuthResultAccessGranted;
     3245    return AuthResultAccessDenied;
     3246}</screen>
     3247
     3248    <para>A note regarding the UUID implementation of the
     3249    <computeroutput>pUuid</computeroutput> argument:
     3250    VirtualBox uses a consistent binary representation of UUIDs on all
     3251    platforms. For this reason the integer fields comprising the UUID are
     3252    stored as little endian values. If you want to pass such UUIDs to code
     3253    which assumes that the integer fields are big endian (often also called
     3254    network byte order), you need to adjust the contents of the UUID to e.g.
     3255    achieve the same string representation. The required changes
     3256    are:<itemizedlist>
     3257        <listitem>
     3258          <para>reverse the order of byte 0, 1, 2 and 3</para>
     3259        </listitem>
     3260
     3261        <listitem>
     3262          <para>reverse the order of byte 4 and 5</para>
     3263        </listitem>
     3264
     3265        <listitem>
     3266          <para>reverse the order of byte 6 and 7.</para>
     3267        </listitem>
     3268      </itemizedlist>Using this conversion you will get identical results
     3269    when converting the binary UUID to the string representation.</para>
     3270
     3271    <para>The <computeroutput>guestJudgement</computeroutput> argument contains
     3272    information about the guest authentication status. For the first call, it is
     3273    always set to <computeroutput>AuthGuestNotAsked</computeroutput>. In case the
     3274    <computeroutput>AuthEntry</computeroutput> function returns
     3275    <computeroutput>AuthResultDelegateToGuest</computeroutput>, a
     3276    guest authentication will be attempted and another call to the
     3277    <computeroutput>AuthEntry</computeroutput> is made with its result.
     3278    This can be either granted / denied or no judgement (the guest component
     3279    chose for whatever reason to not make a decision). In case there is a problem
     3280    with the guest authentication module (e.g. the Additions are not installed or
     3281    not running or the guest did not respond within a timeout), the "not reacted"
     3282    status will be returned.</para>
    31733283  </chapter>
    31743284
     
    35683678          for details.</para>
    35693679        </listitem>
     3680
     3681        <listitem>
     3682          <para>Support for remote desktop access to virtual machines
     3683          has been cleaned up to allow third party implementations of
     3684          the remote desktop server. This is called VirtualBox Remote Desktop Extension
     3685          and can be added to VirtualBox by installing the corresponding
     3686          extension package.</para>
     3687          <para>The following API changes were made to support the VRDE interface:
     3688            <itemizedlist>
     3689              <listitem>
     3690                <para><computeroutput>IVRDPServer</computeroutput> interface has been
     3691                renamed to <xref linkend="IVRDEServer" xreflabel="IVRDEServer" />.</para>
     3692              </listitem>
     3693
     3694              <listitem>
     3695                <para><computeroutput>IRemoteDisplayInfo</computeroutput> interface has been
     3696                renamed to <xref linkend="IVRDEServerInfo" xreflabel="IVRDEServerInfo" />.</para>
     3697              </listitem>
     3698            </itemizedlist>
     3699          </para>
     3700        </listitem>
     3701
     3702        <listitem>
     3703          <para>VirtualBox external authentication module interface
     3704          has been updated and made more general.</para>
     3705          <para>Because of that, <computeroutput>VRDPAuthType</computeroutput> enumeration has been
     3706          renamed to <xref linkend="AuthType" xreflabel="AuthType" />.
     3707          </para>
     3708        </listitem>
    35703709      </itemizedlist>
    35713710    </sect1>
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette