Skip to content
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

Create individual user accounts instead of sharing ocdskfp #142

Closed
jpmckinney opened this issue May 6, 2020 · 5 comments
Closed

Create individual user accounts instead of sharing ocdskfp #142

jpmckinney opened this issue May 6, 2020 · 5 comments
Labels
S: kingfisher Relating to the Kingfisher servers

Comments

@jpmckinney
Copy link
Member

Presently, unless analysts are diligent in naming and organizing files and directories and tmux sessions to include their name, it takes some effort to determine to whom files and sessions belong. If each user had their own account, this would be easy without extra steps.

Since we changed how users interact with Scrapyd, the only remaining use case for ocdskfs is to read the Scrapyd log files from the command-line. However, the files are world readable, so any user can access these.

The ocdskfp user is presently used to activate a virtual environment and run Kingfisher Process and Views commands. We can look into a different deployment pattern so that individual users can run these commands without having multiple instances of the apps.

@jpmckinney jpmckinney added the S: kingfisher Relating to the Kingfisher servers label May 6, 2020
@jpmckinney
Copy link
Member Author

jpmckinney commented Dec 17, 2022

  • Similarly, can create individual accounts instead of sharing scrape htpasswd access.

@jpmckinney jpmckinney changed the title Create individual user accounts instead of sharing ocdskfs and ocdskfp Create individual user accounts instead of sharing ocdskfp May 27, 2023
@jpmckinney
Copy link
Member Author

ocdskfs was already no longer shared (no authorized_keys argument in its create_user macro call).

@jpmckinney
Copy link
Member Author

jpmckinney commented May 27, 2023

@RobHooper On the new server, Kingfisher Summarize will have a command-line tool at /home/summarize/kingfisher-summarize/manage.py

Instead of giving everyone access to the summarize user, I'd like each person to have their own accounts.

The manage.py file is world-executable by default. However, it needs to read the owner-readable-only ~/.pgpass file. It also reads the current user's ~/.config/kingfisher-summarize/logging.json file.

I don't know enough about sudo configuration, but is there a way to allow other users to run manage.py as if they were the summarize user (and read those files)?


Update: I guess another option is to set each user's .pgpass file (handy for the user, so they don't need to enter their password when logged in). I think the only remaining issue is that Summarize will try to read the wrong logging.json file.

I'll think about adding an option that sets a fixed path for that file.

Edit: Okay, that's what I did. Nevermind!

@jpmckinney
Copy link
Member Author

Issue open as have to document how to run Kingfisher Process as a non-owner.

jpmckinney added a commit that referenced this issue May 27, 2023
Rename:
- ocdskfs: collect (to match registry, in order to avoid confusion)
- ocdskfp: summarize
- collect: incremental
- ocdskingfishercollect: kingfisher-collect (directory) or kingfisher_collect (database)
- ocdskingfisherprocess: kingfisher_process
- ocdskingfisherscrape: kingfisher-collect
- ocdskingfisherviews: kingfisher-summarize
- OCDS_KINGFISHER_SCRAPE_*: OCDS_KINGFISHER_COLLECT_*

Salt/Pillar:
- Move data support-related commands, Python packages, SQL extensions and reference schema to kingfisher/init.sls
- Create individual users, and remove access to general user #142
- Create .pgpass files for the individual users
- collect: Give deployer user access to the FILES_STORE directory
- process: Set ENABLE_CHECKER
- summarize: Change .env to world-readable (contains no secrets)
- summarize: Set KINGFISHER_SUMMARIZE_LOGGING_JSON in .env
- summarize: summary_view_1_2_research schema was deleted
- Use contents key for .pgpass files

Docs:
- Remove Kingfisher Process v1-specific documentation
@jpmckinney
Copy link
Member Author

Added documentation to bullet list in #402

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S: kingfisher Relating to the Kingfisher servers
Projects
None yet
Development

No branches or pull requests

1 participant