This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
wiki:advanced:x2gobroker:start [2013/03/27 16:03] sunweaver |
wiki:advanced:x2gobroker:start [2013/03/28 10:12] sunweaver [How do I use an X2Go Session Broker with X2Go Client] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== X2Go Session Broker ====== | + | ====== X2Go Session Broker |
- | ===== What is X2Go Session Broker ===== | + | //Provided by Oleksandr Shneyder, edited by Mike Gabriel// |
- | Most of you have already used X2Go Client in standalone mode. X2Go Client in standalone mode allows to be configured by the user himself. Normally, the user creates a set of session profiles that allow the user to work remotely on one or more X2Go Servers. See the documentation that explains [[doc: | + | ===== What is an X2Go Session Broker ===== |
+ | |||
+ | Most of you have already used X2Go Client in standalone mode. X2Go Client in standalone mode allows to be configured by the user himself. Normally, the user creates a set of session profiles that allows | ||
When X2Go Client is run in broker mode, then it does not allow the local definition of session profiles. The list of session profiles gets provided by the X2Go Session Broker. A session broker is either a HTTP(s) server or an SSH server. | When X2Go Client is run in broker mode, then it does not allow the local definition of session profiles. The list of session profiles gets provided by the X2Go Session Broker. A session broker is either a HTTP(s) server or an SSH server. | ||
- | The implementations of the X2Go Session Broker can be manifold as long as the returned result is interpretable by X2Go Client. | + | In large-scale deployments an X2Go Session Broker can be used to centrally provide X2Go session profiles to X2Go Client. The list of provided X2Go session profiles can be user or client-address specific. |
- | ===== How do I use an X2Go Session Broker | + | An X2Go Session Broker |
- | If you have access to an X2Go Session | + | The implementation of X2Go Session |
- | * '' | + | One possible impementation |
- | * '' | + | <code bash> |
+ | $ sudo apt-get install x2gobroker-daemon | ||
+ | </code> | ||
- | * '' | + | ===== How do I use an X2Go Session Broker with X2Go Client ===== |
- | * '' | + | |
- | * '' | + | If you have access to an X2Go Session Broker, you can launch X2Go Client in broker |
- | valid only for SSH broker. | + | |
- | * '' | + | * '' |
- | parameter is valid only for SSH broker. | + | |
- | * '' | + | * '' |
- | only for HTTP(S) | + | * ''< |
+ | * ''< | ||
+ | * ''< | ||
- | ===== How X2Go broker | + | * ''< |
- | ==== Authentication ==== | + | * ''< |
- | The X2Go client can use different methods of authentication. | ||
- | |||
- | On HTTP(S) | ||
- | broker it could be username and password. On SSH broker a SSH key | ||
- | authentication can also be used. With both types of broker you can | ||
- | verify additional parameter " | ||
- | is saved in file. Path to file can be specified as X2Go Client command | ||
- | line option " | ||
- | data as it shown in example above. In such case function checkAccess | ||
- | should always return 1. In example of SSH-Broker this function is not | ||
- | called at all. The broker just print " | ||
- | know, that authentication is successful. In some setups can make sense | ||
- | to give access to broker without authentication. For example in LAN if | ||
- | broker only serve as load balancer for X2Go Servers. | ||
- | |||
- | 2.2. List of predefined X2Go sessions | ||
- | |||
- | After successful authentication on broker, X2Go Client will request list | ||
- | of predefined X2Go Sessions. This list look just the same as session | ||
- | file of X2Go Client. The function, that send X2Go sessions to Client | ||
- | look like: | ||
- | < | ||
- | sub listSessions | ||
- | { | ||
- | print " | ||
- | < | ||
- | option1=value1< | ||
- | .... | ||
- | optionN=valueN< | ||
- | < | ||
- | option1=value1< | ||
- | .... | ||
- | optionN=valueN< | ||
- | END_USER_SESSIONS< | ||
- | } | ||
- | </ | ||
- | The options are the same as in X2Go Client configuration file. There is | ||
- | only a difference in parameters " | ||
- | parameters which are not supported in configuration file " | ||
- | " | ||
- | The " | ||
- | actual address of a server will be provided after session selection. It | ||
- | can make sense in a case of load balancing. The best server will be | ||
- | chosen after selection and sent to client. | ||
- | The " | ||
- | selection of session too. However, you can set this parameter with some | ||
- | value to inform the Client, that passwordless authentication should be | ||
- | tried, for example: " | ||
- | Parameter " | ||
- | should not be asked, but broker password should be used instead. It can | ||
- | be useful if the broker and X2Go Server using same authentication server | ||
- | and there is no need to ask the same password twice. It is not | ||
- | recommended to use such authentication with HTTP Broker without SSL | ||
- | encryption. | ||
- | Parameter " | ||
- | to say X2Go Client that an instance (or instances) of this session | ||
- | already running or are suspended on server. X2Go Client will display the | ||
- | status on the Session button. | ||
- | |||
- | 2.3. Selecting a session | ||
- | |||
- | When predefined sessions are listed in X2Go Client, user can choose a | ||
- | session from sessions list. The id of chosen session will be sent to | ||
- | broker and broker send a connection data back to client. It is | ||
- | responsibility of function " | ||
- | < | ||
- | sub selectSession | ||
- | { | ||
- | my ($user, $sid)=@_; | ||
- | if($sid eq " | ||
- | { | ||
- | print " | ||
- | } | ||
- | } | ||
- | </ | ||
- | |||
- | This function send a server address and SSH port for X2Go connection. If | ||
- | no other data are specified a new X2Go session will be created. | ||
- | Broker can also send to Client information, | ||
- | should be resumed. In this case broker should also send a session data | ||
- | to Client: | ||
- | < | ||
- | sub selectSession | ||
- | { | ||
- | my ($user, $sid)=@_; | ||
- | if($sid eq " | ||
- | { | ||
- | print " | ||
- | |||
- | " | ||
- | } | ||
- | </ | ||
- | Broker can get this data from session database or by executing | ||
- | " | ||
- | broker mode, it will not verify if there are existing sessions on X2Go | ||
- | server. It is a responsibility of X2Go Broker. Broker should also | ||
- | suspend session before providing session data to client if session is | ||
- | running. | ||
- | |||
- | The broker can also provide a SSH Key to client: | ||
- | < | ||
- | sub selectSession | ||
- | { | ||
- | my ($user, $sid)=@_; | ||
- | if($sid eq " | ||
- | { | ||
- | print " | ||
- | print " | ||
- | Proc-Type: 4,ENCRYPTED | ||
- | DEK-Info: AES-128-CBC, | ||
- | |||
- | XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX | ||
- | yX7XLwCszCLM1FCYpdIGmM98vuHVcpNlVUBVgNcTxE1XCCnPZPjUXiNnUZPk1lme | ||
- | XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX | ||
- | o1q7Q1YmH43qI18lifjUhGZUTYWKQSsj2Am9bnjqaveV2aMEWymC8J9aJOYLpVZG | ||
- | XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX | ||
- | G1DwWnSRgyJaxRm4Ik0/ | ||
- | XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX | ||
- | VR60OGB7dHy+7ozqkjzuX+uB04GIqPJwG797i26Bo4v7uhbALjMa5qsObqXIPM1S | ||
- | XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX | ||
- | XXXXXXXXXXXXXXXX== | ||
- | -----END DSA PRIVATE KEY-----"; | ||
- | } | ||
- | } | ||
- | </ | ||
- | It can be useful in some cases. It is recommended to transfer such keys | ||
- | only over encrypted channels. It is also recommended to transfer only | ||
- | temporary keys, which should be removed from known_hosts after | ||
- | authorization on X2Go server. | ||