Skip to content

U/jrbogart/authdb#218

Merged
JoanneBogart merged 8 commits intomainfrom
u/jrbogart/authdb_fileprotect
Apr 24, 2026
Merged

U/jrbogart/authdb#218
JoanneBogart merged 8 commits intomainfrom
u/jrbogart/authdb_fileprotect

Conversation

@JoanneBogart
Copy link
Copy Markdown
Collaborator

For running at NERSC (currently the only realistic option), use by default the common authorization file living in /global/common. This eliminates all the fuss which had been necessary to create a personal authorization file.

@JoanneBogart JoanneBogart requested review from stuartmcalpine and removed request for stuartmcalpine April 22, 2026 21:39
@AstroPatty
Copy link
Copy Markdown
Collaborator

This looks good to me for implementing default authentication. It's a simple solution that should be low-maintenance.

I do have one higher-level concern. Is there anything in place that prevents a user from modifying/deleting an entry from another user, now that everyone in DESC would be using the same credentials?

@JoanneBogart
Copy link
Copy Markdown
Collaborator Author

The goal is to only allow deletion by the owner and by a collaboration account which will be used for archiving. I originally planned to do all that in a single PR (hence the branch name) but the second part will be deferred to another PR because it's going to be more complicated:

  • Higher-level directories need to be writeable by everyone (so they can add new files) but the actual files constituting the dataset should be writeable only by owner. This is going to take a little refactoring of code in dataset.py and registrar_utils.py
  • A collaboration account to be used for archiving will need to be able to delete as well

The database part is much easier to deal with. I don't think anyone (except possibly me or other admin in special circumstances) is going to bypass the API. The routines for deleting or replacing entries can check if the caller has the same NERSC userid as the person who created the dataset in the first place (userid is already saved when an entry is created) and if not, refuse to do the operation.

Once this PR is merged I'll move on to the rest, perhaps deferring the collaboration account part to yet a third PR since it's not likely to be a stumbling block for a while.

@JoanneBogart
Copy link
Copy Markdown
Collaborator Author

@AstroPatty Please take another look in light of my comments above. Thanks.

@AstroPatty
Copy link
Copy Markdown
Collaborator

@JoanneBogart Great this all sounds good. I think this PR is good to go.

@JoanneBogart
Copy link
Copy Markdown
Collaborator Author

@JoanneBogart Great this all sounds good. I think this PR is good to go.

Thanks, @AstroPatty ! Could you please formally approve?

@JoanneBogart JoanneBogart merged commit 3613fd9 into main Apr 24, 2026
28 checks passed
@JoanneBogart JoanneBogart deleted the u/jrbogart/authdb_fileprotect branch April 27, 2026 18:25
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.

2 participants