VirtualBox

Changeset 40130 in vbox for trunk/src/VBox/Installer


Ignore:
Timestamp:
Feb 14, 2012 3:17:35 PM (13 years ago)
Author:
vboxsync
Message:

Main/webservice+doc/manual: Add SSL support to the webservice, and also add an optional parameter which ensures the authentication setting is correct. Update manual and SDK reference.

Location:
trunk/src/VBox/Installer
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Installer/linux/vboxweb-service.sh.in

    r36480 r40130  
    33# VirtualBox web service API daemon init script.
    44#
    5 # Copyright (C) 2006-2011 Oracle Corporation
     5# Copyright (C) 2006-2012 Oracle Corporation
    66#
    77# This file is part of VirtualBox Open Source Edition (OSE), as
     
    293293        [ -n "$VBOXWEB_HOST" ]           && PARAMS="$PARAMS -H $VBOXWEB_HOST"
    294294        [ -n "$VBOXWEB_PORT" ]           && PARAMS="$PARAMS -p $VBOXWEB_PORT"
     295        [ -n "$VBOXWEB_SSL_KEYFILE" ]    && PARAMS="$PARAMS -s -K $VBOXWEB_SSL_KEYFILE"
     296        [ -n "$VBOXWEB_SSL_PASSWORDFILE" ] && PARAMS="$PARAMS -a $VBOXWEB_SSL_PASSWORDFILE"
     297        [ -n "$VBOXWEB_SSL_CACERT" ]     && PARAMS="$PARAMS -c $VBOXWEB_SSL_CACERT"
     298        [ -n "$VBOXWEB_SSL_CAPATH" ]     && PARAMS="$PARAMS -C $VBOXWEB_SSL_CAPATH"
     299        [ -n "$VBOXWEB_SSL_DHFILE" ]     && PARAMS="$PARAMS -D $VBOXWEB_SSL_DHFILE"
     300        [ -n "$VBOXWEB_SSL_RANDFILE" ]   && PARAMS="$PARAMS -r $VBOXWEB_SSL_RANDFILE"
    295301        [ -n "$VBOXWEB_TIMEOUT" ]        && PARAMS="$PARAMS -t $VBOXWEB_TIMEOUT"
    296302        [ -n "$VBOXWEB_CHECK_INTERVAL" ] && PARAMS="$PARAMS -i $VBOXWEB_CHECK_INTERVAL"
    297303        [ -n "$VBOXWEB_THREADS" ]        && PARAMS="$PARAMS -T $VBOXWEB_THREADS"
    298304        [ -n "$VBOXWEB_KEEPALIVE" ]      && PARAMS="$PARAMS -k $VBOXWEB_KEEPALIVE"
     305        [ -n "$VBOXWEB_AUTHENTICATION" ] && PARAMS="$PARAMS -A $VBOXWEB_AUTHENTICATION"
    299306        [ -n "$VBOXWEB_LOGFILE" ]        && PARAMS="$PARAMS -F $VBOXWEB_LOGFILE"
    300307        [ -n "$VBOXWEB_ROTATE" ]         && PARAMS="$PARAMS -R $VBOXWEB_ROTATE"
  • trunk/src/VBox/Installer/solaris/smf-vboxwebsrv.sh

    r36748 r40130  
    22# $Id$
    33
    4 # Copyright (C) 2008-2011 Oracle Corporation
     4# Copyright (C) 2008-2012 Oracle Corporation
    55#
    66# This file is part of VirtualBox Open Source Edition (OSE), as
     
    4242        VW_PORT=`/usr/bin/svcprop -p config/port $SMF_FMRI 2>/dev/null`
    4343        [ $? != 0 ] && VW_PORT=
     44        VW_SSL_KEYFILE=`/usr/bin/svcprop -p config/ssl_keyfile $SMF_FMRI 2>/dev/null`
     45        [ $? != 0 ] && VW_SSL_KEYFILE=
     46        VW_SSL_PASSWORDFILE=`/usr/bin/svcprop -p config/ssl_passwordfile $SMF_FMRI 2>/dev/null`
     47        [ $? != 0 ] && VW_SSL_PASSWORDFILE=
     48        VW_SSL_CACERT=`/usr/bin/svcprop -p config/ssl_cacert $SMF_FMRI 2>/dev/null`
     49        [ $? != 0 ] && VW_SSL_CACERT=
     50        VW_SSL_CAPATH=`/usr/bin/svcprop -p config/ssl_capath $SMF_FMRI 2>/dev/null`
     51        [ $? != 0 ] && VW_SSL_CAPATH=
     52        VW_SSL_DHFILE=`/usr/bin/svcprop -p config/ssl_dhfile $SMF_FMRI 2>/dev/null`
     53        [ $? != 0 ] && VW_SSL_DHFILE=
     54        VW_SSL_RANDFILE=`/usr/bin/svcprop -p config/ssl_randfile $SMF_FMRI 2>/dev/null`
     55        [ $? != 0 ] && VW_SSL_RANDFILE=
    4456        VW_TIMEOUT=`/usr/bin/svcprop -p config/timeout $SMF_FMRI 2>/dev/null`
    4557        [ $? != 0 ] && VW_TIMEOUT=
    4658        VW_CHECK_INTERVAL=`/usr/bin/svcprop -p config/checkinterval $SMF_FMRI 2>/dev/null`
    4759        [ $? != 0 ] && VW_CHECK_INTERVAL=
     60        VW_THREADS=`/usr/bin/svcprop -p config/threads $SMF_FMRI 2>/dev/null`
     61        [ $? != 0 ] && VW_THREADS=
    4862        VW_KEEPALIVE=`/usr/bin/svcprop -p config/keepalive $SMF_FMRI 2>/dev/null`
    4963        [ $? != 0 ] && VW_KEEPALIVE=
     64        VW_AUTHENTICATION=`/usr/bin/svcprop -p config/authentication $SMF_FMRI 2>/dev/null`
     65        [ $? != 0 ] && VW_AUTHENTICATION=
     66        VW_LOGFILE=`/usr/bin/svcprop -p config/logfile $SMF_FMRI 2>/dev/null`
     67        [ $? != 0 ] && VW_LOGFILE=
    5068        VW_ROTATE=`/usr/bin/svcprop -p config/logrotate $SMF_FMRI 2>/dev/null`
    5169        [ $? != 0 ] && VW_ROTATE=
     
    6179        [ -z "$VW_TIMEOUT" ] && VW_TIMEOUT=20
    6280        [ -z "$VW_CHECK_INTERVAL" ] && VW_CHECK_INTERVAL=5
     81        [ -z "$VW_THREADS" ] && VW_THREADS=100
    6382        [ -z "$VW_KEEPALIVE" ] && VW_KEEPALIVE=100
    6483        [ -z "$VW_ROTATE" ] && VW_ROTATE=10
    6584        [ -z "$VW_LOGSIZE" ] && VW_LOGSIZE=104857600
    6685        [ -z "$VW_LOGINTERVAL" ] && VW_LOGINTERVAL=86400
    67         exec su - "$VW_USER" -c "/opt/VirtualBox/vboxwebsrv --background --host \"$VW_HOST\" --port \"$VW_PORT\" --timeout \"$VW_TIMEOUT\" --check-interval \"$VW_CHECK_INTERVAL\" --keepalive \"$VW_KEEPALIVE\" --logrotate \"$VW_ROTATE\" --logsize \"$VW_LOGSIZE\" --loginterval \"$VW_LOGINTERVAL\""
     86
     87        # Derived and optional settings
     88        VW_SSL=
     89        [ -n "$VW_SSL_KEYFILE" ] && VW_SSL=--ssl
     90        [ -n "$VW_SSL_KEYFILE" ] && VW_SSL_KEYFILE="--keyfile $VW_SSL_KEYFILE"
     91        [ -n "$VW_SSL_PASSWORDFILE" ] && VW_SSL_PASSWORDFILE="--passwordfile $VW_SSL_PASSWORDFILE"
     92        [ -n "$VW_SSL_CACERT" ] && VW_SSL_CACERT="--cacert $VW_SSL_CACERT"
     93        [ -n "$VW_SSL_CAPATH" ] && VW_SSL_CAPATH="--capath $VW_SSL_CAPATH"
     94        [ -n "$VW_SSL_DHFILE" ] && VW_SSL_DHFILE="--dhfile $VW_SSL_DHFILE"
     95        [ -n "$VW_SSL_RANDFILE" ] && VW_SSL_RANDFILE="--randfile $VW_SSL_RANDFILE"
     96        [ -n "$VW_LOGFILE" ] && VW_LOGFILE="--logfile $VW_LOGFILE"
     97
     98        exec su - "$VW_USER" -c "/opt/VirtualBox/vboxwebsrv --background --host \"$VW_HOST\" --port \"$VW_PORT\" $VW_SSL $VW_SSL_KEYFILE $VW_SSL_PASSWORDFILE $VW_SSL_CACERT $VW_SSL_CAPATH $VW_SSL_DHFILE $VW_SSL_RANDFILE --timeout \"$VW_TIMEOUT\" --check-interval \"$VW_CHECK_INTERVAL\" --threads \"$VW_THREADS\" --keepalive \"$VW_KEEPALIVE\" --authentication \"$VW_AUTHENTICATION\" $VW_LOGFILE --logrotate \"$VW_ROTATE\" --logsize \"$VW_LOGSIZE\" --loginterval \"$VW_LOGINTERVAL\""
    6899
    69100        VW_EXIT=$?
  • trunk/src/VBox/Installer/solaris/virtualbox-webservice.xml

    r36520 r40130  
    55# $Id$
    66
    7      Copyright (C) 2008-2011 Oracle Corporation
     7     Copyright (C) 2008-2012 Oracle Corporation
    88
    99     This file is part of VirtualBox Open Source Edition (OSE), as
     
    8787            <propval name='host' type='astring' value='localhost' />
    8888            <propval name='port' type='integer' value='18083' />
     89            <propval name='keyfile' type='astring' value='' />
    8990        </property_group>
    9091
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