Skip to content
This repository was archived by the owner on Dec 21, 2021. It is now read-only.

Commit e9f992b

Browse files
committed
Tiny bit of tidying up.
1 parent 6ca3ee1 commit e9f992b

File tree

3 files changed

+30
-5
lines changed

3 files changed

+30
-5
lines changed

scitokens-cli/src/main/java/org/scitokens/tools/SciTokensUtil.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@ public static void main(String[] args) {
140140
}
141141

142142
SciTokensUtil sciTokensCLI = new SciTokensUtil(myLoggingFacade);
143-
sciTokensCLI.useHelp();
144143
SciTokensUtilCommands sciTokensCommands = new SciTokensUtilCommands(myLoggingFacade);
145144
sciTokensCommands.setVerbose(isVerbose);
146145
sciTokensCommands.setPrintOuput(!isNoOuput);
@@ -159,6 +158,7 @@ public static void main(String[] args) {
159158
}
160159
if (argLine.hasArg(BATCH_MODE_FLAG)) {
161160
sciTokensCLI.processBatchModeCommand(cli, args);
161+
return; //this should end once a single command is processed.
162162
}
163163
// alternately, parse the arguments
164164
String cmdLine = args[0];
@@ -201,7 +201,7 @@ protected void processBatchModeCommand(CLIDriver cli, String[] args) throws Exce
201201
// so we need to drop the name of the function and the -batch flag.
202202
String cmdLine = "";
203203
for (String arg : args) {
204-
if (!arg.equals(DUMMY_FUNCTION) && !arg.equals(SciTokensUtilCommands.BATCH_FILE_MODE_FLAG)) {
204+
if (!arg.equals(DUMMY_FUNCTION) && !arg.equals(SciTokensUtilCommands.BATCH_MODE_FLAG)) {
205205

206206
cmdLine = cmdLine + " " + arg;
207207
}

scitokens-server/src/main/resources/install.txt

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,20 @@ First off read the readme on the site for the requirements:
44

55
https://github.com/scitokens/scitokens-java/blob/master/README.md
66

7-
Then you can get the current release candidate at
7+
Then you can get the current release candidate (version 1.2a) at
88

99
https://github.com/scitokens/scitokens-java/releases/tag/v.1.2a
1010

1111
This contains the server, a client (both a web app and a command line client) as well as the utilities for creating and
1212
managing keys. There are also a couple of schell scripts to run a few things.
1313

14-
The most
14+
15+
Generating keys
16+
After you get the release candidate, you need to invoke the scitokens-util command line utility to create keys (if you
17+
do not have them from another source). This is easy, you can do it in batch mode as
18+
19+
java -jar scitokens-util.jar -batch create_keys /path/to/file.jwk
20+
21+
This will create a basic set of JSON web keys. This path go into your server configuration file.
22+
23+
Make sure that

scitokens-server/src/main/webapp/registration-init.jsp

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
</tr>
5151

5252
</table>
53+
<H2>Enter your SciTokens audiences and scope request templates. </H2>
5354

5455
<table>
5556
<tr>
@@ -99,6 +100,21 @@
99100
<input type="hidden" id="status" name="${action}"
100101
value="${request}"/>
101102
</form>
102-
103+
<h3>A little explanation about audiences and templates.</h3>
104+
<p>These refer to SciToken specific scopes. Audiences are associated with sets of scope
105+
templates. The templates allow you to specify what access you permit. Templates may
106+
end in <code>**</code> wildcards indicating any sub-path will be accepted.
107+
You should enter only a single template per line. A typical template would like like</p>
108+
<pre>read:/public/**</pre>
109+
<p>To give read access to everything in the /public directory and below it.
110+
You may also use variables such as</p>
111+
<ul>
112+
<li>${user} = the user's name at logon. This is taken from the claim given above.</li>
113+
<li>${group} = IF there is group information associated with this user (e.g. in LDAP) then you may
114+
access the name of the group here. </li>
115+
</ul>
116+
<p>For instance if a user is in the groups <code>admin,users,gravity</code> then a permission template might look
117+
like <code>read:/home/${user}/${group}/**</code> and if user bob could make the following specific request
118+
against this template: <code>read:/home/bob/gravity/data/raw.hdf</code></p>
103119
</body>
104120
</html>

0 commit comments

Comments
 (0)