open-policy-agent / contrib

Integrations, examples, and proof-of-concepts that are not part of OPA proper.

Home Page:http://www.openpolicyagent.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problem With Jansonn Module integration

Leeladitya opened this issue · comments

Hello, I am new to OPA, I am trying to integrate OPA with linux PAM, for sudo and ssh authorization, but the tutorial covers only for docker version, but i am trying to install on standalone server. I have followed the instructions from https://github.com/open-policy-agent/contrib/blob/master/pam_opa/pam/README.md, but there is problem with the jansson library module (i can't find the module to copy it to PAM module) and its very difficult to follow, can anyone help me with installing the OPA-PAM for standalone, UBUNTU server. Thanks

You can likely follow similar instructions to configure your system and build the library as what the docker image uses:

https://github.com/open-policy-agent/contrib/blob/master/pam_opa/docker/pam-builder.dockerfile

Specific to the jansson library see:

# Fetch and install the JSON library.
# Source is at: https://github.com/akheron/jansson
RUN wget http://www.digip.org/jansson/releases/jansson-2.11.tar.gz && \
tar -xvf jansson-2.11.tar.gz && \
cd jansson-2.11 && \
./configure --prefix=/usr && \
make && \
make check && \
make install
# Archive the JSON library contents for installation in the running container.
RUN cd /usr/lib && \
tar -cf jansson_lib libjansson* && \
mv jansson_lib /

Closing due to inactivity. Let me know if there's anything actionable left here, and I'll re-open.