Feature: Generate User Tokens#389
Conversation
|
@jdanish Please give this a spin to see if this works for managing user tokens. There are multiple things to try:
Most likely you won't have Test 1: Check if
|
|
Issue: the tokens I generated work, but the shared ones don't even work in the initial graph ... thoughts? (treat as incorrect password)
Edit: updated screen cap @benloh wanted to make sure you didn't miss this one. |
|
I need to run past Kalani, but I think this approach works. We will want to change the word "salt" maybe to make it more intuitive and maybe put "Admin password: " before the box to avoid confusion? Also, is the password checked on the server or client? That is, could I figure out the password easily using the javascript console? It's not terribly likely, but ... Otherwise, yes I like this approach so far. Note, I've only tested locally so far ... DO soon. |
|
Hmm...maybe we do need to drop the notion of shareable tokens after all. I think the degree of shareability is affected by the presence or absence of the
i think the important thing at this stage is making sure the admin password approach makes sense. I was deliberately trying to make it vague so that there isn't a giant "Admin Password" field that simply invites hacking. But if that's what you prefer we can do that. Keep in mind that a student going to the Advanced panel will immediately see the "Admin password" field. The password is definitely not super secure. But you shouldn't be able to see in in plain javascript. If we inadvertently left the project template definition visible then yes it is visible (e.g. if we had a console command like I was trying to avoid the |
|
OK, let's go with secretKey, and use this for now and assume long-term we
need full authentication, but this is pretty safe. I'm OK with kids seeing
Admin password since they won't have a way to figure out what it is, and
honestly none are trying so far. One will eventually, but then it's up to
the teacher to hide the sticky-note.
|
…CDATA to reduce state updates
…ry component to isolate state updates Prevents NCInfoPanel updates from causing tables to render twice
…if the table is closed
…heights for short tables. If there weren't enough items in the table, the filter summary and dragger would expand
…ing to improve Chromebook performance
TO DO
|
…sword` has not been defined.





Use the "Advanced Panel" to generate User Tokens.
Wiki
Advanced Panel
How protections work
To make it security protections less obvious (and more difficult for students to suss out) there are three levels of password protection.
CAVEAT: This is low grade security at best and is relatively easy to work around.
1. Student / Regular User View
By default, the "Advanced" panel is visible, but only the "Export" tab is visible.
At the bottom of the "Advanced" panel is an unlabeled password input field with no "Submit" button.
adminPasswordhas not been defined however,Admin Mode Disabledwill be displayed.2. Privileged Import User
For some projects, e.g. research groups, sometimes you need to allow a logged in user to be able to import node/edge data. There is a template setting that allows this:
If this is set and a user is logged in, the "Import Data" panel will be visible.
3. Teacher
With a password, a teacher can access teacher-enabled advanced panel tabs:
In order to access those items, a teacher must enter a password.
adminPasswordfield.adminPasswordhas not been defined however,Admin Mode Disabledwill be displayed.4. Researcher: Look Up Password
If a teacher forgets the password, or a researcher needs to access the "Advanced" panel, what can they do?
We are disabling the
?admin=trueoverride, so you will have to look up the password via the template.Digital Ocean
On Digital Ocean, the fix is to look up the current template via ssh.
NC_CONFIGto determine thedatasetname.adminPasswordfield.Turbo360
On Turbo360, the fix is to look up the current template in Turbo360's portal.
https://portal.turbo360.co/and log in<dataset>.template.tomlfile to download itadminPasswordfield.User Tokens
Historically, user tokens were defined either by using the web console
ncMakeTokenscommand or to usenc-multiplex'sUI tool.The new "Advanced" panel can now be used to generate tokens.
secretKeyBy default, tokens are project-template-specific. The project has a
secretKeystring defined in the template that is used to create a unique hash for the user token.secretKeycan be any string less than 12 characters.secretKeyfor every project that needs a unique token.secretKeyfor each classroom's project.secretKeyis not defined in the template, tokens can still be generated, but the tokens can then be used on any other project that does not havesecretKeydefined. (Under the hood, the hash uses just theclassIdand theprojIdas the secretKey, skipping the project secretKey).secretKeyis not defined, the "Shareable" tokens checkbox will be automatically checked and disabled, and a warning message displayed.