summaryrefslogtreecommitdiff
path: root/tools
AgeCommit message (Collapse)Author
2025-06-11Use base64.urlsafe_b64encode() instead of manual specification of charsMagnus Hagander
This makes for better readability, and is exactly the same functionality... Pointed out by Jacob Champion
2025-06-11Implement authenticated encryption in community authMagnus Hagander
This creates a community auth version 3 (previous one being 2, and 1 is long gone) trhat uses AES_SIV as the encryption method instead of regular AES_CBC, and validates the digests on all accounts. As this gets deployed on servers incrementall, the version has to be specified in the database record for the site. We could have the site indicate this itself, but doing it this way seems safer as it will then just break for any app that accidentally reverts the plugin. Reviewed by Jacob Champion
2025-06-11Remove suburl support in test_auth.pyMagnus Hagander
This was removed from actual community auth a very long time ago (in 2013, in commit 78de94d1).
2025-04-01Update to latest version of auth pluginMagnus Hagander
For some reason, downstream repos had a newer version but we forgot it in the upstream repo.
2024-04-09Fix cauthreceiver for flask in python3Magnus Hagander
This has been logging errors since forever -- but still worked in practice :)
2023-12-15fix typo in commentStefan Kaltenbrunner
2023-08-28Add some load-time validation of PGAUTH_KEY in the django sampleMagnus Hagander
Will result in a nicer error when the key is wrong, and in particular a startup error instead of a runtime error. Reviewed-by: Célestin Matte
2023-06-07Fix arguments in signal callingMagnus Hagander
2023-06-07Give nicer error message when URL data is corruptMagnus Hagander
2023-06-07Add new signal auth_user_created_from_upstream to sampleMagnus Hagander
This signal fires when a new user has been created either from the user logging in the first time or from an import.
2023-06-07Import subscribe_to_user_changes function to sample auth.pyMagnus Hagander
This was used on git.postgresql.org, but hadn't been propagated upstream.
2022-06-20Fix typo in commentMagnus Hagander
2022-06-20Refactor docsload and add support for loading from directoryMagnus Hagander
Break out the tar parsing parts into a function for just that and create a new one that knows how to load directly from the html directory in the postgresql source tree, for more efficient snapshot loading.
2022-06-20Store the git hash of developer docs loadedMagnus Hagander
This will require some further updates on the loading side of things before it's fully valid, but for now track and show a link to the git hash used to build developer docs *if* one is specified. We only track it for devel (because releases have release numbers) and we only show it in the cases where we would already show the loading time.
2022-06-20Use the proper set of arguments in docs loaderMagnus Hagander
We parsed it out using the options parser, but then when using it required a hardcoded order on the commandline. That made no sense...
2021-10-27Fix data.sql sample for searchMagnus Hagander
The fix in 52455885 broke the data.sql preloading of example data. Fix the insert for the main website (patch from Célestin Matte), and also delete those parts of the file that are no longer relevant.
2021-10-23Add baseurl field to sites table in the search systemMagnus Hagander
This table isn't used beyond a single row at this time, so there is a lot to be done for simplifying things around it, but for a quick-fix just add the field that actually should be there. Spotted by Célestin Matte
2021-08-11Add verbose mode to docs loading and tweak defaultsMagnus Hagander
Instead of printing every single page loaded, print the start of the process and the statitics by default. The existing --quiet parameter continues to work to make the process completely quiet. Add a new parameter --verbose that makes it run in the old way, printing everything.
2021-05-18Purge PDF listings page when new PDFs are uploadedMagnus Hagander
This will update which versions have PDFs as well as their sizes.
2021-05-18Make documentation purges use xkeyMagnus Hagander
2021-05-17Handle varnish purges for the static repo as wellMagnus Hagander
By calling the purge notifier script with --static, the paths wil be taken as part of the pgweb-static repostory instead, and purged with a prefix of files/
2021-02-24Make sure Host: header is included in varnish purgesMagnus Hagander
2021-02-22Remove old archives_search functionMagnus Hagander
This function hasn't been used since we switched tot he new archives system that does the search through a http api.
2021-02-22Retire search for "community sites"Magnus Hagander
This hasn't worked for a few years (since 900946df) and nobody has complained. Getting rid of it allows similifying a few things on the search server side as well.
2020-11-23Only flag docs as loaded when they've actually changedMagnus Hagander
We already avoided the actual updates (by filtering the UPDATE statement), but since we set the load date we'd trigger a change to every page and kick it ouf of the caches even when not chagned, which is wasteful. So instead only do that if something has changed. When it has, we still reset that whole version of the docs since we want the load date to be consistent across them.
2020-09-28Fix typo in commentMagnus Hagander
2020-09-16Exclude the pgAdmin repos from the FTP crawl.Dave Page
2020-08-12Simplify transaction handling in the changetracker daemonMagnus Hagander
Previously we used a combination of optimistic concurrency control (by DELETEing with both the id and the date included in the WHERE clause) and REPEATABLE READ transactions. This would create serialization conflicts when completely unnecessary. Since in this case it doesn't matter if we happen to push the same thing twice, switch completely to optimistic concurrency control. That gets rid of having to deal with serialization issues.
2020-08-12Update nagios monitor to check for duplicated email addressesMagnus Hagander
This should not be possible if things are done through the appropriate interfaces, and those interfaces are bug-free (right..). But really bad things can probably happen if they don't, so put a monitor in place to check for it. This also adds a view in the db that shows all registered email addresses and their accounts, regardless of if it's primary or secondary address. This is used by the nagios check but can of course be useful to manual checks as well.
2020-08-12Tweak mediawiki to handle NULL in email fieldsMagnus Hagander
It really shouldn't exist, but we clearly have cases where the community auth plugin sets the email to NULL, so we need to handle that case when looking for what to update.
2020-08-11Use unbuffered output by default in changetrackerMagnus Hagander
2020-08-11Add cauth push receiver plugins for mediawiki and redmineMagnus Hagander
2020-08-11Implement synchronization for community authenticationMagnus Hagander
This adds the concept of an apiurl to each site that uses community authentication, that the main website server can make calls to and send updates. This URL will receive POSTs from the main website when a user account that has been used on this site gets updated, and can then optionally update it's local entries with it (the django plugin sample is updated to handle this fully). Updates are only sent for users that have a history of having logged into the specific site -- this way we avoid braodcasting user information to sites requiring specific constent that the user hasn't given, and also decreases the amount of updates that have to be sent. Updates are queued by the system in a table and using listen/notify a daemon that's running picks up what needs to be updated and posts it to the endpoints. If this daemon is not running, obviously nothing gets sent. Updates are tracked using triggers in the database which push information into this queue.
2020-08-11Make django community auth plugin only save changed fieldsMagnus Hagander
2020-08-10Make user_import in the django auth plugin return the new userMagnus Hagander
It's useful to be able to directly get at the user record that was returned instead of having to re-query it from the database. Since nothing was previously returned, this is not backwards incompatible.
2020-07-13Remove unused importsMagnus Hagander
2020-04-03Update authentication to be django 2 compatibleMagnus Hagander
2020-02-26Sync community auth plugin to be the latest-and-greatestMagnus Hagander
Combine changes from downstream projects (which were not that many anymore)
2020-01-09Fix a number of incorrect escapesMagnus Hagander
Pointed out by newer versions of pep8, but they were never correct.
2020-01-09Stop using bare exceptionsMagnus Hagander
This is frowned upon in newer versions of pep8, so fix it once and for all.
2019-11-01Fix unicode bug from python3 conversionMagnus Hagander
2019-11-01Switch to using pycryptodome instead of pycryptoMagnus Hagander
pycrypto is not being maintained, and pycryptodome is theoretically a drop-in replacement (in practice, it seems it was close)
2019-06-25Save away copy of all ovailable oauth buttonsMagnus Hagander
Including a reference to where we got them from.
2019-05-16Update yum spider and download page for new reporpmsMagnus Hagander
The yum project has switched to single-reporpm-for-multiple-versions as well as putting them in a dedicated directory. This makes a lot of the cruft in the code to deal with the distribution of reporpms unnecessary, so change it. We still need to keep track of which platforms exist for which versions, so we do still need some spidering, but it's alot simpler. Since all versions are also always availeble, the javascript that populates the version list can now just use the list of supported versions. This could be rendered directly in the HTML, but we might need to restrict versions-per-platform at some point in the future, and javascript is needed anyway for the rest of the page, so we keep doing it the old way.
2019-05-16Fix filemode for temporary files in yum spiderMagnus Hagander
This was broken in the python3 update, but it's only used when testing via temporary files and never in production, and thus went unnoticed.
2019-04-25Add Bootstrap grid classes to images referenced in the HTML docs.Jonathan S. Katz
2019-03-31Add a lot more code documentation to the documentation loader.Jonathan S. Katz
2019-03-31Do not use libtidy on content from SVG files.Jonathan S. Katz
2019-03-31Remove global variable reference that increments the page count in the ↵Jonathan S. Katz
docloader. This is primarily to remove some old code to allow for future changes to how certain types of doc files can be loaded in the future.
2019-03-10Added pycodestyle to requirements.txt and pre-commit hook.Jonathan S. Katz