Skip to content

Commit

Permalink
Merge pull request #1010 from ORNL/1009-add-endpoint-specific-tokens-…
Browse files Browse the repository at this point in the history
…to-database

1009 add endpoint specific tokens to database
  • Loading branch information
JoshuaSBrown authored Oct 30, 2024
2 parents 26cd4cd + 7a5a727 commit fd5a17a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
## MINOR Feature
1. [987] - This implements serialized GitLab CI pipelines
2. [918] - Add admin script for making a user an admin
3. [1009] - Add collections to database for holding Globus tokens.

## PATCH Bug fixes/Technical Debt/Documentation
1. [984] - Fixes {server_default} from showing up in path.
Expand Down
4 changes: 3 additions & 1 deletion core/database/foxx/db_clear.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ db._truncate("c");
db._truncate("t");
db._truncate("a");
db._truncate("q");
db._truncate("globus_token");
db._truncate("globus_coll");
db._truncate("owner");
db._truncate("member");
db._truncate("item");
Expand All @@ -24,4 +26,4 @@ db._truncate("lock");
db._truncate("block");

db._dropView("textview");
db._dropView("projview");
db._dropView("projview");
7 changes: 6 additions & 1 deletion core/database/foxx/db_create.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,18 @@ graph._addVertexCollection("t"); // Topic
graph._addVertexCollection("a"); // Alias
graph._addVertexCollection("n"); // Annotations (notes)
graph._addVertexCollection("q"); // Saved queries
graph._addVertexCollection("globus_coll"); // Globus Collections
graph._addVertexCollection("repo"); // Repository servers
graph._addVertexCollection("task"); // Tasks
graph._addVertexCollection("tag"); // Tags
graph._addVertexCollection("sch"); // Schemas
graph._addVertexCollection("config"); // Configuration
graph._addVertexCollection("metrics"); // Metrics

// Access and Refresh tokens needed by Globus on a per user basis to access
// different collections
const globus_token = graph_module._relation("globus_token", ["u"], ["globus_coll"]);
graph._extendEdgeDefinitions(globus_token);

var owner = graph_module._relation("owner", ["d", "c", "p", "g", "a", "q", "task"], ["u", "p"]);
graph._extendEdgeDefinitions(owner);
Expand Down Expand Up @@ -413,4 +418,4 @@ db.metrics.ensureIndex({
unique: false,
fields: ["timestamp", "type", "uid"],
sparse: true
});
});

0 comments on commit fd5a17a

Please sign in to comment.