.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{ . if \nF \{ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "CipUX::RPC::Server 3pm" .TH CipUX::RPC::Server 3pm "2015-07-24" "perl v5.20.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" CipUX::RPC::Server \- RPC server class for CipUX .SH "VERSION" .IX Header "VERSION" version 3.4.0.9 .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use CipUX::RPC::Server; .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" Provides the functions for CipUX \s-1RPC\s0 server. .SH "ABSTRACT" .IX Header "ABSTRACT" The CipUX rpc server is a generic abstract class, which can be used by other classes or scripts. .SH "SUBROUTINES/METHODS" .IX Header "SUBROUTINES/METHODS" The following functions are implemented or supported by CipUX::RPC::Server. .SS "\s-1BUILD\s0" .IX Subsection "BUILD" Constructor, see new. .SS "\s-1DEMOLISH\s0" .IX Subsection "DEMOLISH" Destructor. .SS "new" .IX Subsection "new" Constructor .PP \&\fBSyntax:\fR .PP .Vb 1 \& my $cipux_rpc = CipUX::RPC::Server\->new(); .Ve .SS "check_authentication" .IX Subsection "check_authentication" Check weather the login has access or not. .SS "is_ticket_bad" .IX Subsection "is_ticket_bad" Return 1 if a ticket is \s-1OK\s0 otherwise 0; .SS "signal_handler" .IX Subsection "signal_handler" Install signal_handler alias time to die. .PP \&\fBSyntax:\fR .PP .Vb 1 \& $server\->signal_handler({}); .Ve .SS "answer_requests" .IX Subsection "answer_requests" Answer Requests. .PP \&\fBSyntax:\fR .PP .Vb 8 \& $server\->answer_requests({ \& port=>8000, \& address=>\*(Aqlocalhost\*(Aq, \& reuse=>0, \& proto=>\*(Aqtcp\*(Aq, \& meth_hr=>TODO \& task_hr=>TODO \& }); .Ve .SS "check_access_to_task" .IX Subsection "check_access_to_task" Check the access for login to a task. .SS "check_access_to_rpc_intern" .IX Subsection "check_access_to_rpc_intern" Check the access for login to the rpc_intern section. .SS "check_access_to_cat_module" .IX Subsection "check_access_to_cat_module" Check the access for login to a \s-1CAT\s0 module. .SS "error" .IX Subsection "error" Construct an error message. .SS "evaluate_access" .IX Subsection "evaluate_access" Evaluate the access to login or a given user depending on the sub command (subcmd) of rpc_info or rpc_intern for one or more realms. Known realms are: task, cat_module, rpc_intern. .SS "update_task" .IX Subsection "update_task" Check and update tasks entries. .SS "update_cat_module" .IX Subsection "update_cat_module" Check and update \s-1CAT\s0 modules entries. .SS "log2syslog" .IX Subsection "log2syslog" Log a given message to syslog. .SS "get_config" .IX Subsection "get_config" Return the value for a given configuration variable. .SS "rpc_list_functions" .IX Subsection "rpc_list_functions" List the rpc functions. .SS "rpc_start" .IX Subsection "rpc_start" Start the \s-1RPC\s0 server. .PP \&\fBSyntax:\fR .PP .Vb 1 \& $server\->rpc_start({}); .Ve .SS "ping" .IX Subsection "ping" The function 'ping' is for testing the connection. It requires not to log in and no arguments. It returns '\s-1OK\s0'. .SS "version" .IX Subsection "version" Return the CipUX version. .SS "sum" .IX Subsection "sum" The function 'sum' is for testing the connection. It requires not to log in and 2 arguments. It returns the sum of the arguments as a hash reference with a single line. .SS "login" .IX Subsection "login" Perform a login. .SS "logout" .IX Subsection "logout" Perform a logout. .SS "session" .IX Subsection "session" Check the ticket and if it is valid update and return a new ticket. .SS "ttl" .IX Subsection "ttl" Return the Time To Live. Default 900 seconds. .SS "rpc_task" .IX Subsection "rpc_task" Execute a CipUX::Task. .SS "rpc_info" .IX Subsection "rpc_info" Execute a rpc_info sub-command. .PP \fItask_access\fR .IX Subsection "task_access" .PP Needs parameter: \s-1TASK\s0 .PP \fItask_access_survey\fR .IX Subsection "task_access_survey" .PP Needs parameter: \s-1TASK\s0 [\s-1TASK\s0] ... .PP \fIcat_module_access\fR .IX Subsection "cat_module_access" .PP Needs parameter: \s-1MODULE\s0 .PP \fIcat_module_access_survey\fR .IX Subsection "cat_module_access_survey" .PP Needs parameter: \s-1MODULE\s0 [\s-1MODULE\s0] ... .PP \fIrpc_intern_access\fR .IX Subsection "rpc_intern_access" .PP Needs parameter: \s-1COMMAND\s0 .PP \fIrpc_intern_access_survey\fR .IX Subsection "rpc_intern_access_survey" .PP Needs parameter: \s-1COMMAND\s0 [\s-1COMMAND\s0] ... .SS "rpc_intern" .IX Subsection "rpc_intern" Execute a rpc_intern sub-command. .PP \fIttl\fR .IX Subsection "ttl" .PP Prints current \s-1TTL\s0 in seconds .PP \fIcat_module_cache_size\fR .IX Subsection "cat_module_cache_size" .PP Prints current cat module cache size .PP \fIrpc_intern_cache_size\fR .IX Subsection "rpc_intern_cache_size" .PP Prints current rpc intern cache size .PP \fItask_cache_size\fR .IX Subsection "task_cache_size" .PP Prints current task_cache_size of cache .PP \fIuser_task_access\fR .IX Subsection "user_task_access" .PP Needs parameter: \s-1USER TASK\s0 .PP \fIuser_task_access_survey\fR .IX Subsection "user_task_access_survey" .PP Needs parameter: \f(CW$USER\fR \s-1TASK\s0 [\s-1TASK\s0] ... .PP \fIuser_cat_module_access\fR .IX Subsection "user_cat_module_access" .PP Needs parameter: \s-1USER MODULE\s0 .PP \fIuser_cat_module_access_survey\fR .IX Subsection "user_cat_module_access_survey" .PP Needs parameter: \s-1USER MODULE\s0 [\s-1MODULE\s0] ... .PP \fIuser_rpc_intern_access\fR .IX Subsection "user_rpc_intern_access" .PP Needs parameter: \s-1USER COMMAND\s0 .PP \fIuser_rpc_intern_access_survey\fR .IX Subsection "user_rpc_intern_access_survey" .PP Needs parameter: \s-1USER COMMAND\s0 [\s-1COMMAND\s0] ... .PP \fIflush_cache\fR .IX Subsection "flush_cache" .PP Flush \s-1RPC\s0 server \s-1RBAC\s0 cache .SH "Public XML-RPC functions." .IX Header "Public XML-RPC functions." All the following CipUX::Task methods are public. Public means that they could be executed remotely. Public means not that everybody can do this remotely. .PP There are two kinds of public functions: .PP (1) Functions without authorization .PP .Vb 3 \& \- login \& \- ping \& \- sum .Ve .PP (2) Every other function is available only after using 'login' function, with a uid as first parameter and a valid ticket as second parameter. .PP Examples (pseudo code): .PP .Vb 3 \& \- (reference to user list) = cipux_task_list_users( uid, ticket ); \& \- (true|false) = logout( uid, ticket ); \& \- (new ticket|false) = session( uid, ticket ); .Ve .PP If the uid do not match, or the uid has not the authorization to use the function, or the group of the uid has not the authorization to use the function, or the ticket is expired, or the ticket is not valid the request will not be fulfilled. .PP In other words: if the uid match and has the right and the role also has the right and the ticket is valid and is not expired, the request will be executed. .PP To see real examples have a look at CipUX::RPC::Client client. .SH "DIAGNOSTICS" .IX Header "DIAGNOSTICS" \&\s-1TODO\s0 .SH "CONFIGURATION AND ENVIRONMENT" .IX Header "CONFIGURATION AND ENVIRONMENT" Need no environment variables. But do need a configuration file. For example cipux\-rpc.ini .SH "DEPENDENCIES" .IX Header "DEPENDENCIES" .Vb 10 \& Authen::Simple::PAM \& Authen::Simple::Password \& Carp \& CipUX::Task \& CipUX::RBAC::Simple \& Class::Std \& Data::Dumper \& English \& Frontier::Daemon \& Frontier::RPC2 \& List::MoreUtils \& Log::Log4perl \& Log::Dispatch \& POSIX \& Readonly \& Ticket::Simple .Ve .SH "INCOMPATIBILITIES" .IX Header "INCOMPATIBILITIES" Not known. .SH "BUGS AND LIMITATIONS" .IX Header "BUGS AND LIMITATIONS" Not known. .SH "SEE ALSO" .IX Header "SEE ALSO" See the CipUX webpage and the manual at .PP See the mailing list .SH "AUTHOR" .IX Header "AUTHOR" Christian Kuelker .SH "LICENSE AND COPYRIGHT" .IX Header "LICENSE AND COPYRIGHT" Copyright (C) 2007 \- 2010 by Christian Kuelker .PP This program is free software; you can redistribute it and/or modify it under the terms of the \s-1GNU\s0 General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. .PP This program is distributed in the hope that it will be useful, but \&\s-1WITHOUT ANY WARRANTY\s0; without even the implied warranty of \&\s-1MERCHANTABILITY\s0 or \s-1FITNESS FOR A PARTICULAR PURPOSE. \s0 See the \s-1GNU\s0 General Public License for more details. .PP You should have received a copy of the \s-1GNU\s0 General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, \s-1MA 02111\-1307 USA\s0