about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2026-06-15 18:29:07 -0500
committerFrederick Muriuki Muriithi2026-06-15 18:29:07 -0500
commit1e385752d53d5154dc91f9ba1a737c83038ff430 (patch)
tree70b4823e3b6cad620e8070a4d484045c93a6275c
parent23c27039c677c8077eb6f9ef67afed2121487d31 (diff)
downloadgn-auth-1e385752d53d5154dc91f9ba1a737c83038ff430.tar.gz
Allow generated files to be readable by other users. HEAD main
On CI/CD, the tests are run under a different user that the one that
runs the gn-auth service, therefore we need the generated files to be
readable by more than just the user running the gn-auth service.
-rw-r--r--gn_auth/wsgi.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/gn_auth/wsgi.py b/gn_auth/wsgi.py
index a5af37e..bab9991 100644
--- a/gn_auth/wsgi.py
+++ b/gn_auth/wsgi.py
@@ -174,12 +174,12 @@ def __parse_user_spec__(spec: str) -> dict:
 
 
 def __write_output__(data: dict, output_path) -> None:
-    """Write JSON data to a file with 0600 permissions, or stdout."""
+    """Write JSON data to a file with 0644 permissions, or stdout."""
     text = json.dumps(data, indent=2)
     if output_path is None:
         print(text)
         return
-    fd = os.open(output_path, os.O_WRONLY | os.O_CREAT | os.O_TRUNC, 0o600)
+    fd = os.open(output_path, os.O_WRONLY | os.O_CREAT | os.O_TRUNC, 0o644)
     with os.fdopen(fd, "w") as outfile:
         outfile.write(text)