Aim
First of all we want to provide an general web based interface with the
functionality which is already provided by the YaST command line interface.
This API is based on the REST (Representational state transfer) architecture. This is a
simple interface which transmits domain-specific data over HTTP.
Please have a look to
http://en.wikipedia.org/wiki/Representational_State_Transfer
for more information about REST.
The second aim is to provide a YaST Web UI which can be used by every
web browser.
The current state of the project is an existing YaST-Webservice on the
host side which provides the REST based interface.
On the client side we have the concerning YaST-Webclient which can be
used be any web browser.
YaST-Webservice and YaST-Webclient are running as a webserver
(currently lighttpd) on different or even the same computer.
So the aim is to configure a host via the internet in a simple and
safety way.
How does it work ?
The YaST Webclient communicate via HTTP(s) with the YaST Webservice. The
user has to authenticate ( username, password ) to the host via PAM
(Pluggable Authentication Modules) which is available on every linux system.
The YaST Webclient sends requests ( e.g. create a user, install patch) to
the YaST Webservice. This service checks if the user has the right to
execute this request via PolicyKit. For each kind of request there is
PolicyKit rule defined. These rights has to be granted to the concerning user.
After permission check the request will be send via DBUS to the SCR agent of
YaST. The return value will be given back to YaST-Webclient in XML or JSON
format.
Patches will be handled by PackageKit. These requests will also be sent from
the YaST Webservice to PackageKit via DBUS.
How to get it ?
Have a look the openSUSE buildservice project
YaST Webservice (home:schubi2)
There are all needed packages for version openSuSE 11.1 and above.
As some additional packages (e.g. lighttpd) are needed which are not on openSuSE 11.1 you should add a
repositories ( e.g. factory ) in order to provide these packages.
The simplest way for installation would be to use zypper:
zypper in yast2-core-2*.rpm
zypper in ruby-dbus-*.rpm
zypper in yast2-webservice-*.rpm
zypper in yast2-webclient-*.rpm
How to use the YaST-Webservice
After you have installed these packages you can start the YaST-Webservice-Server with
rcyastws start
The server is running as “localhost:8080” with which you can connect with a web browser:
http://localhost:8080
This “pure” web page shows the available modules which can be used via the REST interface.
This REST API is described under
http://localhost:8080/doc_interface.html
Additional configuration stuff like
– setup Hostname and Port
– setup HTTPS connection
– granting permissions for an single user
– AVAHI support
can be found here:
http://localhost:8080/doc_config.html
How to use the YaST-Webclient
After you have started the YaST-Webservice-Server you also can start the YaST-Webclient:
rcyastwc start
Now you can use any browser and connect with http://<name of your computer> to your
computer.
The default rights of the YaST Webservice are set to root only. So you can login with the root password
of that machine.
Following features are implemented:
– setting languages
– setting system time
– setting user permissions
– installing patches
– managing local users
– export user SSH-keys
– starting,stopping,status,… of services
– configuration of ntp server
Have a look to the following screen shot it order to give an overview how it looks like:
Known Bugs
-The first call of an menue entry will be slow cause an additional process will be started.
The second one should be much more faster 🙂
-Permissions will sometime not be shown correctly (just click “search” again) Bug 470645