Custom middleware?

57 views
Skip to first unread message

David Chandek-Stark

unread,
Feb 21, 2017, 11:58:43 AM2/21/17
to archivematica
Hi,

Is it possible/supported to implement a custom Django middleware component for the dashboard app?

Thanks,
David

Jesús García Crespo

unread,
Feb 21, 2017, 3:34:59 PM2/21/17
to archiv...@googlegroups.com
Hi David,

It's totally possible but you'll have to make changes to the source code. If you're installing from the packages that may be not be a good idea. However, you could build your own packages or install from a git repository of yours where you keep your own customizations. The advantage of using a git repo is that it'll be much easier for you to pull from upstream when we release a new version of Archivematica, deal with code conflicts, etc...

Don't hesitate to ask more questions.

Regards,

--
You received this message because you are subscribed to the Google Groups "archivematica" group.
To unsubscribe from this group and stop receiving emails from it, send an email to archivematica+unsubscribe@googlegroups.com.
To post to this group, send email to archiv...@googlegroups.com.
Visit this group at https://groups.google.com/group/archivematica.
For more options, visit https://groups.google.com/d/optout.



--
Jesús García Crespo,
Software Engineer, Artefactual Systems Inc.
http://www.artefactual.com | +1.604.527.2056

David Chandek-Stark

unread,
Feb 21, 2017, 10:19:57 PM2/21/17
to archivematica
Thanks, Jesús. Actually, what I want to do is described in the Django docs: https://docs.djangoproject.com/en/1.10/howto/auth-remote-user/.

It would be nice not to have to fork the code just to be able to implement this functionality. However, if that's the best way to do it at this time, that's probably OK.

--David


On Tuesday, February 21, 2017 at 3:34:59 PM UTC-5, Jesús García Crespo wrote:
Hi David,

It's totally possible but you'll have to make changes to the source code. If you're installing from the packages that may be not be a good idea. However, you could build your own packages or install from a git repository of yours where you keep your own customizations. The advantage of using a git repo is that it'll be much easier for you to pull from upstream when we release a new version of Archivematica, deal with code conflicts, etc...

Don't hesitate to ask more questions.

Regards,
On Tue, Feb 21, 2017 at 8:58 AM, David Chandek-Stark <dchand...@gmail.com> wrote:
Hi,

Is it possible/supported to implement a custom Django middleware component for the dashboard app?

Thanks,
David

--
You received this message because you are subscribed to the Google Groups "archivematica" group.
To unsubscribe from this group and stop receiving emails from it, send an email to archivematic...@googlegroups.com.

To post to this group, send email to archiv...@googlegroups.com.
Visit this group at https://groups.google.com/group/archivematica.
For more options, visit https://groups.google.com/d/optout.

Justin Simpson

unread,
Feb 21, 2017, 11:16:49 PM2/21/17
to archiv...@googlegroups.com
Hi David,

That sounds like something that a couple of other Archivematica users are talking about implementing.  One use case I have heard about is integrating to shibboleth, using https://github.com/nginx-shib, the other is ldap integration with something like https://github.com/nginxinc/nginx-ldap-auth, in both cases connecting to some django middleware in both the archivematica dashboard and the archivematica storage service.

Is this close to your use case?  Are you interested in describing your use case/idea a bit more? 


Justin Simpson
Director of Archivematica Technical Services
www.artefactual.com
604-527-2056

To unsubscribe from this group and stop receiving emails from it, send an email to archivematica+unsubscribe@googlegroups.com.

David Chandek-Stark

unread,
Feb 24, 2017, 1:48:33 PM2/24/17
to archivematica
Hi Justin,

We use Shibboleth with Apache 2.4. I have used the Django middleware previously (a few years ago) with this setup and it works seamlessly. There really wasn't a need to deal with Shibboleth directly since it sets REMOTE_USER. The main thing is being able to auto-login with the REMOTE_USER id. The password on the account can be set to an "unusable password" to prevent bypassing Shib.

Does that give you enough info?

Thanks,
David
Reply all
Reply to author
Forward
0 new messages