You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+22-6Lines changed: 22 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,19 +8,35 @@ This has not been published to npm yet (may not be...)
8
8
9
9
So clone or download, run `npm install` in the `fintojs/` directory, and then just set up the network alias as described in the docs linked above (I have only tested with `ifconfig lo0 alias..` not sure about the other stuff). After that, simply follow the directions in the `SYNOPSIS` section below to start her up.
10
10
11
-
We have some support for the command line options. `-a --addr`, `-p --port`, and `-c --config` are implemented. `-l --log` is not see the synopsis if you need to write to a file (unix only).
11
+
We have some support for the command line options. `-a --addr`, `-p --port`, and `-c --config` are implemented. `-l --log` is not; see the synopsis if you need to write to a file (unix only).**You MUST add a ` -- ` at the beginning of cli options or npm will not pass the arguments to the node process (unix only). See SYNOPSIS section for an example.**
12
12
13
-
We have not tested this on Windows or Cygwin.
13
+
We have not tested this on Windows or Cygwin. I'm not sure how npm behaves there. YMMV.
14
14
15
15
This is currently BETA. Please report any issues.
16
16
17
17
### SYNOPSIS
18
18
```bash
19
+
## first cd into the fintojs directory you cloned..
20
+
$ cd /path/to/clone/of/fintojs
19
21
## with a log
20
-
$ sudo node fintojs.js> /path/to/log/file 2>&1
22
+
$ sudo npm start> /path/to/log/file 2>&1&
21
23
## without a log
22
-
$ sudo node fintojs.js
24
+
$ sudo npm start
23
25
## without sudo you would need to customize at least the port:
This should work with all the helpers. Please report any issues or mising features (except the logging, of course).
28
+
This should work with all the helpers. Please report any issues or missing features (except the logging, of course).
29
+
30
+
### TESTING
31
+
32
+
We have a test script you can use to test your server (**on port 80 only!**) with any credentials you have. This is a good way to test to see if your configuration is working, if the server is up, etc:
33
+
34
+
```bash
35
+
## again in the fintojs directory you cloned...
36
+
$ npm test [<federated-role-alias>]
37
+
```
38
+
where the *<federated-role-alias>* is the configured key to a federated role ARN you have configured in your `.fintorc` file. This is optional. If you leave it out, it will use the default role configured in `.fintorc`
39
+
40
+
The report is not the greatest, you will be able to see which helpers passed or failed and then it will be your job to check logs, server output, etc to find out what's wrong. If an investigation concludes that you did everything right (or at least believe so..), and tests are still failing, open an issue ticket and describe how to reproduce the issue.
Copy file name to clipboardExpand all lines: package.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
{
2
2
"name": "fintojs",
3
-
"version": "0.2.0",
3
+
"version": "0.4.0",
4
4
"description": "Fintojs is based upon finto (https://github.com/threadwaste/finto) written by Tony M. It is basically an sts service interface to resolve multiple iam roles for aws. Please read more documentation here: https://github.com/threadwaste/finto/blob/master/README.md",
// console.log("<==== roles test positive in url")
123
-
action = parts[0];
124
-
switch (parts.length) {
125
-
case 2:
126
-
// console.log("parts length: " + parts.length);
127
-
action = 'arn'
128
-
acct = parts[1]; //arn request for acct
129
-
break;
130
-
case 3:
131
-
acct = parts[1];
132
-
action = parts[2]; //credentials action for acct
133
-
134
-
}
135
-
}
136
-
// this needs to be split up to it's own action.. because we are supposed to return the active alias or credentials depending on whether or not there is an alias in the url.
137
-
else if (/security-credentials/.test(req.url)) {
138
-
139
-
switch(parts.length) {
140
-
case 4:
141
-
action = parts[parts.length-1]; //should be security-credentials
142
-
break;
143
-
case 5:
144
-
action = parts[parts.length-2]; //should be security-credentials
145
-
acct = parts[parts.length-1]; //should be role key
146
-
break;
147
-
default:
148
-
callback("bad security-credentials request!");
149
-
}
150
-
}
151
-
if (/\?/.test(action)) {
152
-
action = (action.split('?'))[0];
153
-
}
154
-
//console.log("action: " + action);
155
-
156
-
// Heavy lifting of action handling. TODO: break this out into a controller.
0 commit comments