Skip to content

Spring Feature: GroupID and SubGroupID Logging Enhancements #42

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jan 10, 2019

Conversation

daveseah
Copy link
Collaborator

@daveseah daveseah commented Jan 9, 2019

This pull request closes #40 "GroupID Subgroups, Logging". It merges Ben's changes in #43

SUBGROUP IDS
GroupID Access tokens (e.g. MEEP-ONE-9V3) can now have subgroups of the form ID#, where # is an integer. The intended use case is that a group of students will receive their access token, and can then add subgroup IDs to the end of it to identify themselves anonymously.

Examples of valid tokens now accepted:

  • group id, no subid MEEP-ONE-9V3
  • group id, sub id 1 MEEP-ONE-9V3-ID1
  • group id, sub id 291 MEEP-ONE-9V3-ID291

Students can pick any number, and then let their teacher know which number they are.

SUBGROUP ID LOGGING
Actions logged by the NetCreate server include the access token, and this also includes the subgroup ID. Researchers should be able to tell who made what contribution from the logs written to runtime/logs. For example:

19:27:35 UADDR_05 [MEEP-ONE-9PK-ID2121]	select node	7	John John 17
19:27:47 UADDR_06 [MEEP-ONE-9V3-ID1]	select node	7	John John 17
19:27:53 UADDR_06 [MEEP-ONE-9V3-ID1]	update node	7	{"label":"John John 17","id":7,"attributes":{"Node_Type":"Person","Extra Info":"","Notes":"TEFUCK!!! BONKERS"}}

Additionally, the nodes and edges in the database record the updating client. While this data isn't currently updated in realtime back to the UI, it is stored in the loki database and can be used to see who created the node and who modified it.

TESTING

STARTING TEST PROCEDURE

  • open two terminal windows and cd to the build directory
  • in terminal window 1, run NetCreate with npm run dev
  • after NetCreate is running, issue the command npm run logtail in window 2

TEST LOGIN SUBGROUPIDS

  • open Chrome and show the Javascript Console (CMD-OPT-J)
  • access NetCreate in read-only mode (i.e. without a valid token)
  • enter valid and invalid tokens and try to break it
  • add the -ID# (where # is any positive integer) to the token to see how it changes
  • look at Terminal 1 and Terminal 2 as you add/modify/delete nodes and edges

KNOWN ISSUES

  • There is no UI to inspect the node and edge access logs from the client at this time. To confirm operation, Terminal 1 will show status of the _nlog and _elog properties that are being updated.
  • Updates to these logs are also not currently updated after the initial database load as part of the SOURCE_UPDATE message sent to clients.

@daveseah
Copy link
Collaborator Author

I've confirmed that adding this functionality on top of #43 seems to not break the new features listed, so accepting pull request.

NOTED

  • When adding/deleting nodes, I sometimes saw an error from NodeSelector.jsx:352 Uncaught (in promise) TypeError: Cannot read property 'localeCompare' of undefined. I reset my database using ncEmptyData() from the CLI and it seems to go away.
  • An error unchecked runtime.lastError: The message port closed before a response was received seems to be related to an update to a Chrome extension. Removing superfluous extensions seemed to fix it.

@daveseah daveseah merged commit b13a79f into dev Jan 10, 2019
benloh pushed a commit that referenced this pull request Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant