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

Patches for Version 5 #50

Open
davrot opened this issue Apr 11, 2024 · 6 comments · May be fixed by #58
Open

Patches for Version 5 #50

davrot opened this issue Apr 11, 2024 · 6 comments · May be fixed by #58
Labels
enhancement New feature or request

Comments

@davrot
Copy link

davrot commented Apr 11, 2024

I created diffs that can be applied to version 5:
https://github.com/davrot/ldap-overleaf-sl

However, I couldn't / will not test them because I am too stupid to get an Authentik server running and was not even able to run a test OAuth2 in Python against it. Thus I will give up on the Authentik server idea and will modify the overleaf password part to be connected directly to a real LDAP server.

Long story short, maybe the diffs and scripts, I did last night, are helpful for somebody...

@yzx9 yzx9 added the enhancement New feature or request label Apr 15, 2024
@yzx9
Copy link
Collaborator

yzx9 commented Apr 15, 2024

Thanks! However, I'll need to test it next weekend. Any reviews in the meantime would be greatly appreciated.

@VPaulV
Copy link

VPaulV commented Apr 20, 2024

I'd be happy to test it. Could you provide instructions on what needs to be done? Would simply applying diffs be sufficient, or should something else be changed in my docker-compose/config as well?

P.S: sorry for the off-topic. @davrot - try setting up authentik+traefik: https://goneuland.de/authentik-in-kombination-mit-traefik/

@davrot
Copy link
Author

davrot commented Apr 20, 2024

VPaulV

Maybe I summarize what I did with https://github.com/davrot/ldap-overleaf-sl:

  1. I modified scripts/make_diffs.sh: "diff -u " Then I downloaded the old files and applied the old patches. After that I re-created the old patches with more context than just the line numbers.

  2. I hacked together ldap-overleaf-sl/extract_files_from_git.sh which takes the required files from the overleaf git.

2b. I made a diff between the old unpatched filed and the new unpatched files, to understand the changes done since then.

  1. ldap-overleaf-sl/apply_diffs_5.sh applies the new new patches to the new files. Most of the re-created old patches with the -u extended information worked out of the box. Two or three patches, I had to modify according the information from 2b.

@VPaulV At that point I noticed that I am too stupid for authentik. The installation seemed to work fine. I made even my own ansible installation script:

https://github.com/davrot/overleaf_ansible/blob/main/useless/install_authentik.yaml

But I was not able to connect my portainer ( https://docs.goauthentik.io/integrations/services/portainer/ ) to it nor to get a valid token with python. I tried stuff like this (and variants)

client = BackendApplicationClient(client_id=client_id)
oauth = OAuth2Session(client=client)
token = oauth.fetch_token(
token_url=token_url,
client_id=client_id,
client_secret=client_secret,
include_client_id=True,
verify=False,
)

for hours. At that point I was pondering my life decision. Maybe I should do something with wood or garden?

@davrot
Copy link
Author

davrot commented Apr 21, 2024

oh, BTW there might be a problem with the update of Tex. The Tex people moved to 2024 and the overleaf docker has still 2023.

I worked around it by creating a volume (please ignore the ansible style :-) ):

- name: Create a volume overleaf_tex2024
  community.docker.docker_volume:
    name: overleaf_tex2024
    state: present

and use the docker volume function to put it at the position of 2023:

    volumes:
        - "overleaf_data:/var/lib/overleaf"
        - "overleaf_tex2024:/usr/local/texlive/2024"
        - "overleaf_tex2024:/usr/local/texlive/2023"

And finally I auto installed tex 2024 into the volume:


  • name: update tex
    hosts: all
    become: true

    tasks:

@thmo
Copy link

thmo commented Aug 29, 2024

Is there by any chance an updated patch set for the current version (5.1.1) somewhere?

@armanddidierjean armanddidierjean linked a pull request Sep 29, 2024 that will close this issue
@armanddidierjean
Copy link

Hi @thmo, if you only need OAuth 2 and don't use LDAP, you may use https://github.com/aeecleclair/ldap-overleaf-sl/tree/5.1.1
Don't forget to update your docker-compose and migrate your database if you want to upgrade an existing installation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants