VirtualBox

Changeset 5771 in vbox


Ignore:
Timestamp:
Nov 16, 2007 2:55:51 PM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
26159
Message:

Main, VBoxManage: add setting for webservice authentication library (which can be NULL to disable authentication)

Location:
trunk/src/VBox
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp

    r5713 r5771  
    538538                 "                            machinefolder default|<folder> |\n"
    539539                 "                            vrdpauthlibrary default|<library> |\n"
     540                 "                            websrvauthlibrary default|null|<library> |\n"
    540541                 "                            hwvirtexenabled yes|no\n"
    541542                 "                            loghistorycount <value>\n"
     
    28212822        systemProperties->COMGETTER(RemoteDisplayAuthLibrary)(str.asOutParam());
    28222823        RTPrintf("VRDP authentication library: %lS\n", str.raw());
     2824        systemProperties->COMGETTER(WebServiceAuthLibrary)(str.asOutParam());
     2825        RTPrintf("Webservice auth. library:    %lS\n", str.raw());
    28232826        systemProperties->COMGETTER(HWVirtExEnabled)(&flag);
    28242827        RTPrintf("Hardware virt. extensions:   %s\n", flag ? "yes" : "no");
     
    65206523            CHECK_ERROR(systemProperties, COMSETTER(RemoteDisplayAuthLibrary)(Bstr(argv[1])));
    65216524    }
     6525    else if (strcmp(argv[0], "websrvauthlibrary") == 0)
     6526    {
     6527        /* reset to default? */
     6528        if (strcmp(argv[1], "default") == 0)
     6529            CHECK_ERROR(systemProperties, COMSETTER(WebServiceAuthLibrary)(NULL));
     6530        else
     6531            CHECK_ERROR(systemProperties, COMSETTER(WebServiceAuthLibrary)(Bstr(argv[1])));
     6532    }
    65226533    else if (strcmp(argv[0], "hwvirtexenabled") == 0)
    65236534    {
  • trunk/src/VBox/Main/SystemPropertiesImpl.cpp

    r5150 r5771  
    301301}
    302302
     303STDMETHODIMP SystemProperties::COMGETTER(WebServiceAuthLibrary) (BSTR *aWebServiceAuthLibrary)
     304{
     305    if (!aWebServiceAuthLibrary)
     306        return E_POINTER;
     307
     308    AutoLock alock (this);
     309    CHECK_READY();
     310
     311    mWebServiceAuthLibrary.cloneTo (aWebServiceAuthLibrary);
     312
     313    return S_OK;
     314}
     315
     316STDMETHODIMP SystemProperties::COMSETTER(WebServiceAuthLibrary) (INPTR BSTR aWebServiceAuthLibrary)
     317{
     318    AutoLock alock (this);
     319    CHECK_READY();
     320
     321    HRESULT rc = setWebServiceAuthLibrary (aWebServiceAuthLibrary);
     322    if (FAILED (rc))
     323        return rc;
     324
     325    alock.unlock();
     326    return mParent->saveSettings();
     327}
     328
    303329STDMETHODIMP SystemProperties::COMGETTER(HWVirtExEnabled) (BOOL *enabled)
    304330{
     
    384410                         bstr.asOutParam());
    385411        rc = setRemoteDisplayAuthLibrary (bstr);
     412        if (FAILED (rc))
     413            break;
     414
     415        CFGLDRQueryBSTR (properties, "webServiceAuthLibrary",
     416                         bstr.asOutParam());
     417        rc = setWebServiceAuthLibrary (bstr);
    386418        if (FAILED (rc))
    387419            break;
     
    431463                       mRemoteDisplayAuthLibrary);
    432464
     465    if (mWebServiceAuthLibrary)
     466        CFGLDRSetBSTR (properties, "webServiceAuthLibrary",
     467                       mWebServiceAuthLibrary);
     468
    433469    CFGLDRSetBool (properties, "HWVirtExEnabled", !!mHWVirtExEnabled);
    434470
     
    498534}
    499535
     536HRESULT SystemProperties::setWebServiceAuthLibrary (const BSTR aPath)
     537{
     538    Utf8Str path;
     539    if (aPath && *aPath)
     540        path = aPath;
     541    else
     542        path = "VRDPAuth";
     543
     544    mWebServiceAuthLibrary = path;
     545
     546    return S_OK;
     547}
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r5770 r5771  
    45374537    <attribute name="remoteDisplayAuthLibrary" type="wstring">
    45384538      <desc>
    4539         Path to the library that provides authentication
    4540         for VRDP clients. The library is used if authentication
    4541         type is set to "external" in the VM RemoteDisplay
    4542         configuration.
    4543 
    4544         The initial value of this property is <tt>VRDPAuth</tt>.
    4545         That is library called VRDPAuth in one of default library
    4546         directories. A full path can be used as well.
    4547 
    4548         <note>
    4549           The library name does not include the file extension.
    4550         </note>
     4539        Library that provides authentication for VRDP clients. The library
     4540        is used if a virtual machine's authentication type is set to "external"
     4541        in the VM RemoteDisplay configuration.
     4542
     4543        The system library extension (".DLL" or ".so") must be omitted.
     4544        A full path can be specified; if not, then the library must reside on the
     4545        system's default library path.
     4546
     4547        The default value of this property is <tt>VRDPAuth</tt>. There is a library
     4548        of that name in one of the default VirtualBox library directories.
     4549
     4550        For details about VirtualBox authentication libraries and how to implement
     4551        them, please refer to the VirtualBox manual.
     4552
    45514553        <note>
    45524554          Setting this property to <tt>null</tt> will restore the
    45534555          initial value.
    45544556        </note>
     4557      </desc>
     4558    </attribute>
     4559
     4560    <attribute name="webServiceAuthLibrary" type="wstring">
     4561      <desc>
     4562        Library that provides authentication for webservice clients. The library
     4563        is used if a virtual machine's authentication type is set to "external"
     4564        in the VM RemoteDisplay configuration and will be called from
     4565        within the <link to="ISessionManager::logon" /> implementation.
     4566
     4567        As opposed to <link to="ISystemProperties::remoteDisplayAuthLibrary" />,
     4568        there is no per-VM setting for this, as the webservice is a global
     4569        resource (if it is running). Only for this setting (for the webservice),
     4570        setting this value to a literal "null" string disables authentication,
     4571        meaning that <link to="ISessionManager::logon" /> will always succeed,
     4572        no matter what user name and password are supplied.
     4573
     4574        The initial value of this property is <tt>VRDPAuth</tt>,
     4575        meaning that the webservice will use the same authentication
     4576        library that is used by default for VBoxVRDP (again, see
     4577        <link to="ISystemProperties::remoteDisplayAuthLibrary" />).
     4578        The format and calling convetion of authentication libraries
     4579        is the same for the webservice as it is for VBoxVRDP.
     4580
    45554581      </desc>
    45564582    </attribute>
     
    45624588        hardware virtualization extensions such as Intel VT-x and
    45634589        AMD SVM by default. This value can be overridden by each VM
    4564         using their <link to="IMachine::HWVirtExEnabled"/> property.
     4590        using their <link to="IMachine::HWVirtExEnabled" /> property.
    45654591      </desc>
    45664592    </attribute>
  • trunk/src/VBox/Main/include/SystemPropertiesImpl.h

    r5150 r5771  
    6868    STDMETHOD(COMGETTER(RemoteDisplayAuthLibrary)) (BSTR *aRemoteDisplayAuthLibrary);
    6969    STDMETHOD(COMSETTER(RemoteDisplayAuthLibrary)) (INPTR BSTR aRemoteDisplayAuthLibrary);
     70    STDMETHOD(COMGETTER(WebServiceAuthLibrary)) (BSTR *aWebServiceAuthLibrary);
     71    STDMETHOD(COMSETTER(WebServiceAuthLibrary)) (INPTR BSTR aWebServiceAuthLibrary);
    7072    STDMETHOD(COMGETTER(HWVirtExEnabled)) (BOOL *enabled);
    7173    STDMETHOD(COMSETTER(HWVirtExEnabled)) (BOOL enabled);
     
    9597    HRESULT setDefaultMachineFolder (const BSTR aPath);
    9698    HRESULT setRemoteDisplayAuthLibrary (const BSTR aPath);
     99    HRESULT setWebServiceAuthLibrary (const BSTR aPath);
    97100
    98101    ComObjPtr <VirtualBox, ComWeakRef> mParent;
     
    103106    Bstr mDefaultMachineFolderFull;
    104107    Bstr mRemoteDisplayAuthLibrary;
     108    Bstr mWebServiceAuthLibrary;
    105109    BOOL mHWVirtExEnabled;
    106110    ULONG mLogHistoryCount;
  • trunk/src/VBox/Main/xml/VirtualBox-settings-common.xsd

    r5755 r5771  
    320320  <xsd:attribute name="defaultSavedStateFolder" type="TLocalFile"/>
    321321  <xsd:attribute name="remoteDisplayAuthLibrary" type="TLocalFile"/>
     322  <xsd:attribute name="webServiceAuthLibrary" type="TLocalFile"/>
    322323  <xsd:attribute name="HWVirtExEnabled" type="xsd:boolean"/>
    323324  <xsd:attribute name="LogHistoryCount" type="xsd:unsignedInt" default="3"/>
Note: See TracChangeset for help on using the changeset viewer.

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