ID |
Date |
Icon |
Author |
Author Email |
Category |
OS |
ELOG Version |
Subject |
67890
|
Thu May 7 14:37:39 2015 |
| Francois Cloutier | Francois@fcmail.ca | Question | Windows | 310.3 | Re: Preloading Options or Moptions from a text file or CSV | Not really...
The thing is I have to let some users the capacity of changing the content of that option list.. I was hoping there could be a different way for
them then to edit the cfg file...
That why I came up at first ask if it could be possible to load an Option list from the content of another logbook... that way I could have made
up some sort of "worker" logbook that would have feed the main logbook Attribute "workers" options list.
> Forget scripting under Windows, this is painful and not really working. Wrong OS for that.
>
> But have you considered conditional attributes? With this you can load different option lists straight from the elogd.cf file. Use something
like this:
>
> Attributes ..., List, Person
>
> Options List = List A{1}, List B{2}
> {1} Options Person = Person a1, Person a2, ...
> {2} Options Person = Person b1, Person b2, ...
>
> So if you choose either "List A" or "List B", you get a different set of persons. Is it that what you want?
>
> /Stefan
>
>
> > a) I couldn't make shell command to execute while elogd was running as a service (I'm running windows and $shell was just returning weird
stuff ); shell script was
> > working only when I launch elogd.exe from a command line:
> >
> > -elogd as a Service running the following : Subst Infographiste = $shell(dir c:\)
> > will return : Shell execution not enabled via -x flag
> >
> > -modifying the Windows Service to add "-X" and running the following :Subst Infographiste = $shell(dir c:\)
> > will return : a empty attribute
> >
> > -running elogd "-x" from a command line, the following : Subst Infographiste = $shell(dir c:\)
> > will return : the dir result..
> >
> > (I also tried to change under witch user the service was running..)
> >
> > b) I just couldn't figure how to build that script....
> >
> > But that would be so nice ! I can see so many situations where I could use such a scenario (loading options from another logbook or from a
txt/csv file
> > somewhere...)
> >
> > Thanks,
> >
> > :) |
67889
|
Thu May 7 09:48:32 2015 |
| Stefan Ritt | stefan.ritt@psi.ch | Question | Windows | 310.3 | Re: Preloading Options or Moptions from a text file or CSV | Forget scripting under Windows, this is painful and not really working. Wrong OS for that.
But have you considered conditional attributes? With this you can load different option lists straight from the elogd.cf file. Use something like this:
Attributes ..., List, Person
Options List = List A{1}, List B{2}
{1} Options Person = Person a1, Person a2, ...
{2} Options Person = Person b1, Person b2, ...
So if you choose either "List A" or "List B", you get a different set of persons. Is it that what you want?
/Stefan
> a) I couldn't make shell command to execute while elogd was running as a service (I'm running windows and $shell was just returning weird stuff ); shell script was
> working only when I launch elogd.exe from a command line:
>
> -elogd as a Service running the following : Subst Infographiste = $shell(dir c:\)
> will return : Shell execution not enabled via -x flag
>
> -modifying the Windows Service to add "-X" and running the following :Subst Infographiste = $shell(dir c:\)
> will return : a empty attribute
>
> -running elogd "-x" from a command line, the following : Subst Infographiste = $shell(dir c:\)
> will return : the dir result..
>
> (I also tried to change under witch user the service was running..)
>
> b) I just couldn't figure how to build that script....
>
> But that would be so nice ! I can see so many situations where I could use such a scenario (loading options from another logbook or from a txt/csv file
> somewhere...)
>
> Thanks,
>
> :) |
67888
|
Thu May 7 02:25:16 2015 |
| Francois Cloutier | Francois@fcmail.ca | Question | Windows | 310.3 | Re: Preloading Options or Moptions from a text file or CSV | > > Title says all :)
> >
> > Is it possible to preload Options or Moptions from a text file or CSV instead of being load from the elogd.conf ?
> >
> > Thanks :)
>
> Quick and simple answer: No.
>
> But please explain me what your case is. Maybe this can be done differently.
That's clear :)
So basically, I have a list of 5-10 workers. I'll have to choose one for each entry I make into the logbook. But these workers will change from time to time
(students) and I don't want the staff to manipulate the config file manually..("Extendable options" is not an option as I will get to many "Darth Vader" entry for
sure..)
I asked if I could populate that option box from another logbook attribute and Andreas told me only possible via external scripts.
https://midas.psi.ch/elogs/Forum/67877
I investigate a little but I found that :
a) I couldn't make shell command to execute while elogd was running as a service (I'm running windows and $shell was just returning weird stuff ); shell script was
working only when I launch elogd.exe from a command line:
-elogd as a Service running the following : Subst Infographiste = $shell(dir c:\)
will return : Shell execution not enabled via -x flag
-modifying the Windows Service to add "-X" and running the following :Subst Infographiste = $shell(dir c:\)
will return : a empty attribute
-running elogd "-x" from a command line, the following : Subst Infographiste = $shell(dir c:\)
will return : the dir result..
(I also tried to change under witch user the service was running..)
b) I just couldn't figure how to build that script....
But that would be so nice ! I can see so many situations where I could use such a scenario (loading options from another logbook or from a txt/csv file
somewhere...)
Thanks,
:) |
67887
|
Wed May 6 21:30:13 2015 |
| Stefan Ritt | stefan.ritt@psi.ch | Question | Windows | 310.3 | Re: Preloading Options or Moptions from a text file or CSV | > Title says all :)
>
> Is it possible to preload Options or Moptions from a text file or CSV instead of being load from the elogd.conf ?
>
> Thanks :)
Quick and simple answer: No.
But please explain me what your case is. Maybe this can be done differently. |
67886
|
Wed May 6 21:25:34 2015 |
| Francois Cloutier | Francois@fcmail.ca | Question | Windows | 310.3 | Preloading Options or Moptions from a text file or CSV | Title says all :)
Is it possible to preload Options or Moptions from a text file or CSV instead of being load from the elogd.conf ?
Thanks :) |
67885
|
Wed May 6 17:35:14 2015 |
| Bruce Bush | bruce_bush@sil.org | Bug report | Linux | 3.10.2 | Path disclosure on unfound file | Greetings,
Running elog 3.1.0 on CentOS 6.6. When I try to access a nonexistent file, elog reveals a path in the 404 page. For example:
Not Found
The requested file /usr/local/elog/themes/default/blortblortblort7854.htm was not found on this server
ELOG version 3.1.0
Is there any way to use a custom 404 page with elog, or to make it stop displaying the file information?
Thank you,
bb
|
67884
|
Wed May 6 15:13:11 2015 |
| Christof Hanke | hanke@rzg.mpg.de | Bug fix | All | 3.1.0 | parse a correctly the username in save_user_config when using Webserver authentication | Hi Stefan,
When we use Webserver authentication, we have the correct username already in the variable http_user.
The old way of copying this http_user to "user" is wrong since we don't use the size of http_user.
Instead, just encode the http_user variable directly.
See attached patch against git HEAD.
Christof
|
Attachment 1: parse_http_user_correctly.patch
|
diff --git a/src/elogd.c b/src/elogd.c
index 601639c..de4734b 100755
--- a/src/elogd.c
+++ b/src/elogd.c
@@ -13142,12 +13142,13 @@ int save_user_config(LOGBOOK * lbs, char *user, BOOL new_user)
/* if we outsourced the authentication, use external username */
getcfg(lbs->name, "Authentication", str, sizeof(str));
- if ( stristr(str, "Webserver")) {
- strlcpy(user, http_user, sizeof(user));
- }
/* do not allow HTML in user name */
- strencode2(user_enc, user, sizeof(user_enc));
+ if ( stristr(str, "Webserver")) {
+ strencode2(user_enc, http_user, sizeof(user_enc));
+ } else {
+ strencode2(user_enc, user, sizeof(user_enc));
+ }
/* check for user name */
if (!isparam("new_user_name") || *getparam("new_user_name") == 0) {
|
67883
|
Wed May 6 12:31:04 2015 |
| Christof Hanke | hanke@rzg.mpg.de | Comment | All | 3.1.0 | Documentation of the webserver authentication | Hi Stefan,
here is a draft of how you could describe the webserver authentication in your docs.
T/Christof |
Attachment 1: webserver_auth_doc.patch
|
diff --git a/doc/adminguide.html b/doc/adminguide.html
index da25388..0568ae3 100755
--- a/doc/adminguide.html
+++ b/doc/adminguide.html
@@ -243,6 +243,37 @@ URL = http://your.proxy.host/subdir/
into elogd.cfg.<p>
+<h3><hr><i>Using apache authentication:</i></h3>
+It is also possible to login via an apache-auth module.
+In elogd.cfg you should use the keyword "Webserver" for Authentication:
+
+<ul><pre>
+Authentication = Webserver
+</pre></ul>
+This triggers elogd to use the environment variable "X-Forwarded-User" as the logged in user.
+A simple example of a apache configuration (including the proxy) is :
+<ul><pre>
+# this required to pass on the generated env-variable X-Forwarded-User to the proxy
+ProxyPassInterpolateEnv On
+
+ProxyPass /elog/ http://your.host.domain:8080/
+
+<Location "/elog">
+ Order allow,deny
+ Allow from all
+ AuthType Basic
+ AuthName "elog-server"
+ AuthUserFile "/opt/elog/htpasswd"
+ require valid-user
+ RequestHeader unset Authorization
+ RequestHeader add X-Forwarded-User %{REMOTE_USER}s
+ # elog doesn't like the '@', so we need to cut it
+ RequestHeader edit X-Forwarded-User "@(.*)$" ""
+</Location>
+</pre></ul>
+
+
+
<hr><a name="imagemagick"> <div class=section> Installing ImageMagick </div> <p>
When images are attached to ELOG entries, thumbnails can be created for quick preview.
This works also for PDF and PostScript files. ELOG forwards any image operation
diff --git a/doc/config.html b/doc/config.html
index 9848f58..9e98855 100755
--- a/doc/config.html
+++ b/doc/config.html
@@ -2207,6 +2207,22 @@ Options Location = Main Building{a}, New Building{b}, Old Building{c}
you have to change your password by other means (such as via the Windows
login if you use a Windows Domain).
</p>
+ <p>
+ Beside the Kerberos authentication, elogd version 3.0 and higher can be configured to accept a authentication done
+ by the webserver.
+ <ul>
+ <li>
+ <b><code>Authentication = Webserver</code></b>
+ </li>
+ </ul>
+ </p>
+ <p>
+ You can also combine it with other authentication methods as shown for Kerberos.
+ </p>
+ <p>
+ Elogd is then accepting the username set in the Request-Header "X-Forwarded-User" as already logged in.<br/>
+ To make this work, you need to configure the webserver correctly, as describe in the adminguide.
+ </p>
<p>
<a name="email" id="email"></a>
|
|