Re: [slurm-users] slurmrestd configuration

2021-04-12 Thread Ward Poelmans
Hi Simone, On 9/04/2021 18:03, Simone Riggi wrote: > All of them are working. > So in this case the only requirement for a user is having the read/write > permission on the socket?  Correct. The authentication is done as you know the user with a socket. > My goal at the end would be to let a Do

Re: [slurm-users] slurmrestd configuration

2021-04-09 Thread Simone Riggi
Thanks Ward. I did the following: $ slurmrestd unix:/var/run/slurmrestd.socket -a rest_auth/local -s v0.0.36 -vvv and to test the response: $ curl --unix-socket /var/run/slurmrestd.socket localhost/slurm/v0.0.36/ping (here "localhost" can be whatever character, need to check --unix-socket cu

Re: [slurm-users] slurmrestd configuration

2021-04-09 Thread Ward Poelmans
Hi Simone, On 8/04/2021 23:23, Simone Riggi wrote: > $ scontrol token lifespan=7200 username=riggi > > How can I configure and test the other auth method (local)? I am using > jwt at the moment. > I would like a user to be always authorized to use the rest API.  local means socket (so you don't

Re: [slurm-users] slurmrestd configuration

2021-04-08 Thread Simone Riggi
Hi again, I think I managed to make it working with: $ slurmrestd -f /etc/slurm/slurmrestd.conf -a rest_auth/jwt -s openapi/v0.0.36 -vvv 0.0.0.0:6820 Sample request: $ curl -H "X-SLURM-USER-NAME:riggi" -H "X-SLURM-USER-TOKEN:${SLURM_JWT}" http://localhost:6820/slurm/v0.0.36/ping { "meta": {

Re: [slurm-users] slurmrestd configuration

2021-04-08 Thread Simone Riggi
Ok, I think I have found the plugins in: /root/rpmbuild/BUILD/slurm-20.11.5/src/slurmrestd/plugins/openapi/ I did: make make install and now I have: $ slurmrestd -s list slurmrestd: Possible OpenAPI plugins: slurmrestd: openapi/v0.0.35 slurmrestd: openapi/v0.0.36 slurmrestd: openapi/dbv0.0.36

Re: [slurm-users] slurmrestd configuration

2021-04-08 Thread Simone Riggi
Thanks very much. I found both files under: /root/rpmbuild/BUILD/slurm-20.11.5/src/slurmrestd/plugins/auth/jwt/.libs/rest_auth_jwt.so /root/rpmbuild/BUILD/slurm-20.11.5/src/slurmrestd/plugins/auth/local/.libs/rest_auth_local.so It seems they weren't installed (any hints why?). By the way I tried

Re: [slurm-users] slurmrestd configuration

2021-04-08 Thread Ward Poelmans
Hi Simone, On 8/04/2021 15:53, Simone Riggi wrote: > - I see effectively that --with jwt is not listed. I wonder how to build > (using rpmbuild) slurm auth plugins?  >   In general I didn't understand from the doc what plugins slurmrestd > expects by default and where it searches it. From -a opti

Re: [slurm-users] slurmrestd configuration

2021-04-08 Thread Simone Riggi
Thanks very much for your reply. - I added this line to the slurm.conf file: AuthAltParameters=jwt_key=/var/spool/slurmctld/jwt_hs256.key I restarted the daemons but this does not change slurmrestd error. I guess this is needed anyway after plugins are found, so thanks for pointing that out. -

Re: [slurm-users] slurmrestd configuration

2021-04-08 Thread Ward Poelmans
Hi Ole, On 8/04/2021 10:09, Ole Holm Nielsen wrote: > On 4/8/21 9:50 AM, Simone Riggi wrote: >> >> rpmbuild -ta slurm-20.11.5.tar.bz2 --with mysql --with slurmrestd >> --with jwt > > I don't see this "--with jwt" in the slurm.spec file: It's not yet there: https://bugs.schedmd.com/show_bug.cgi?i

Re: [slurm-users] slurmrestd configuration

2021-04-08 Thread Ole Holm Nielsen
On 4/8/21 9:50 AM, Simone Riggi wrote: I write you about how to properly setup slurmrestd. ... 2) Installed slurm with: rpmbuild -ta slurm-20.11.5.tar.bz2 --with mysql --with slurmrestd --with jwt I don't see this "--with jwt" in the slurm.spec file: [slurm-20.11.5]# grep "# --with" slurm.s

Re: [slurm-users] slurmrestd configuration

2021-04-08 Thread Ward Poelmans
Hi Simone, On 8/04/2021 09:50, Simone Riggi wrote: > where /etc/slurm/slurmrestd.conf > > include /etc/slurm/slurm.conf > AuthType=auth/jwt Did you add a key? AuthAltParameters=jwt_key=/etc/slurm/jwt.key It needs to be present on the slurmdbd and slurmctld nodes. Ward