Skip to content

Commit 5efc7bf

Browse files
authored
chore(ci): remove pinentry (#580)
1 parent 9a95511 commit 5efc7bf

File tree

6 files changed

+25
-46
lines changed

6 files changed

+25
-46
lines changed

.github/scripts/pinentry.sh

Lines changed: 0 additions & 24 deletions
This file was deleted.

.github/workflows/ci.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,13 @@ jobs:
138138
mkdir -p "$HOME/.gnupg"
139139
chmod 0700 "$HOME/.gnupg"
140140
echo "use-agent" > "$HOME/.gnupg/gpg.conf"
141-
echo "pinentry-program $GITHUB_WORKSPACE/.github/scripts/pinentry.sh" > "$HOME/.gnupg/gpg-agent.conf"
142-
echo "$GPG_PASSPHRASE" > "$HOME/.gnupg/passphrase"
141+
echo "pinentry-mode loopback" >> "$HOME/.gnupg/gpg.conf"
142+
echo "allow-loopback-pinentry" > "$HOME/.gnupg/gpg-agent.conf"
143+
echo "max-cache-ttl 86400" >> "$HOME/.gnupg/gpg-agent.conf"
144+
echo "default-cache-ttl 86400" >> "$HOME/.gnupg/gpg-agent.conf"
145+
gpgconf --kill gpg-agent
143146
gpgconf --launch gpg-agent
144-
gpg --import "$GPG_KEY_PATH"
147+
echo "$GPG_PASSPHRASE" | gpg --batch --yes --passphrase-fd 0 --import "$GPG_KEY_PATH"
145148
echo "1F34F95B4F30BC5B06E0D7CC3F619F17002790D8:6:" | gpg --import-ownertrust
146149
env:
147150
GPG_KEY_ID: ${{ vars.GPG_KEY_ID }}

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,21 +72,21 @@ Thanks to JetBrains IDEs and Sparklabs for their support.
7272
<tbody>
7373
<tr>
7474
<td>
75-
<center>
75+
<p align="center">
7676
<a href="https://www.jetbrains.com/?from=jkroepke">
7777
<picture>
7878
<source srcset="https://www.jetbrains.com/company/brand/img/logo_jb_dos_3.svg" media="(prefers-color-scheme: dark)">
7979
<img src="https://resources.jetbrains.com/storage/products/company/brand/logos/jetbrains.svg" style="height: 50px">
8080
</picture>
8181
</a>
82-
</center>
82+
</p>
8383
</td>
8484
<td>
85-
<center>
85+
<p align="center">
8686
<a href="https://www.sparklabs.com/viscosity">
8787
<img src="https://www.sparklabs.com/static/other/logo_assets/logo_cropped.png" alt="Sparklabs Viscosity logo" style="height: 100px">
8888
</a>
89-
</center>
89+
</p>
9090
</td>
9191
</tr>
9292
</tbody>

docs/Article - How OIDC SSO Authentication works with OpenVPN Community Server.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,28 @@
11
# Introduction
22

3-
[OpenID Connect (OIDC)](https://auth0.com/intro-to-iam/what-is-openid-connect-oidc) is a powerful identity layer built on top of the OAuth 2.0 protocol. It enables clients to verify the identity of an end user based on the authentication performed by an authorization server. Single Sign-On (SSO) is a user authentication service that allows a user to use one set of login credentials to access multiple applications.
3+
[OpenID Connect (OIDC)](https://auth0.com/intro-to-iam/what-is-openid-connect-oidc) adds an identity layer to the OAuth 2.0 protocol. It allows clients to verify a user's identity based on authentication handled by an authorization server. Single Sign-On (SSO) lets users access multiple applications using a single set of login credentials.
44

5-
In the realm of secure and seamless user authentication, the [`openvpn-auth-oauth2`](https://github.com/jkroepke/openvpn-auth-oauth2) plugin emerges as a game-changer. It integrates OpenVPN Community Server with any OIDC provider, leveraging the robustness of OIDC and the convenience of SSO. This powerful combination not only simplifies the authentication process but also significantly enhances the security of your applications.
5+
Within the domain of secure and unified authentication,
6+
the [`openvpn-auth-oauth2`](https://github.com/jkroepke/openvpn-auth-oauth2) plugin delivers a practical solution.
7+
It connects OpenVPN Community Server to any OIDC provider, using the strength of OIDC and the flexibility of SSO.
8+
This setup streamlines authentication workflows and helps strengthen app security.
69

7-
This article will guide you through the intricacies of how OIDC SSO authentication works with OpenVPN Community Server using the `openvpn-auth-oauth2` plugin. We will delve into the technical details of the OIDC SSO authentication process, its benefits, and how it integrates with OpenVPN Community Server. This comprehensive guide aims to empower developers and system administrators to effectively implement and manage secure access to their applications using `openvpn-auth-oauth2`.
10+
Explore how OIDC SSO authentication works with OpenVPN Community Server through the openvpn-auth-oauth2 plugin.
11+
Understand the request flow, setup steps, and key advantages.
12+
This guide helps developers and system administrators apply secure,
13+
standards-based access control using openvpn-auth-oauth2.
814

915
# The Authentication Process
1016

1117
The authentication process using OIDC SSO with OpenVPN Community Server, specifically leveraging the [`openvpn-auth-oauth2`](https://github.com/jkroepke/openvpn-auth-oauth2) plugin and the OpenVPN [webauth protocol](https://github.com/OpenVPN/openvpn3/blob/cb9ce3d71c1cc485aa17ff7d1f53c56e97116e04/doc/webauth.md), unfolds as follows:
1218

13-
1. **Initiation of User Authentication**: When a user attempts to access a resource on the OpenVPN Community Server and is not already authenticated, the server, utilizing the `openvpn-auth-oauth2` plugin, redirects the user to the OIDC provider. This redirection is facilitated by the OpenVPN webauth protocol.
19+
1. **Initiation of User Authentication**: When a user attempts to access a resource on the OpenVPN Community Server and is not already authenticated, the server, using the `openvpn-auth-oauth2` plugin, redirects the user to the OIDC provider. This redirection is facilitated by the OpenVPN webauth protocol.
1420

1521
2. **Interaction with OIDC Provider**: The user is then required to authenticate with the OIDC provider. This could involve various methods such as entering credentials, using a biometric scanner, or any other method that the OIDC provider supports.
1622

1723
3. **Issuance of Tokens**: Post successful authentication, the OIDC provider issues an ID token and an access token. The ID token contains claims about the authentication event and the user. The access token is used to authorize access to resources.
1824

19-
4. **Validation of Tokens**: The OpenVPN Community Server, with the assistance of the `openvpn-auth-oauth2` plugin, validates the ID token and access token. This step is crucial to ensure that the tokens are authentic and have been issued by a trusted OIDC provider.
25+
4. **Validation of Tokens**: The OpenVPN Community Server, with the help of the `openvpn-auth-oauth2` plugin, validates the ID token and access token. This step plays an important role in verifying the authenticity of the tokens and confirming that a trusted OIDC provider issued them.
2026

2127
5. **Granting User Access**: If the tokens are validated successfully, the OpenVPN Community Server grants the user access to the requested resource. This access is granted in accordance with the OpenVPN webauth protocol.
2228

docs/demo/docker-compose.yaml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -166,15 +166,10 @@ services:
166166
aliases:
167167
- keycloak
168168
healthcheck:
169-
test:
170-
- CMD
171-
- sh
172-
- -c
173-
# doing black magic to check if the realm is imported - container does not have curl or wget
174-
- >-
175-
exec 5<>/dev/tcp/127.0.0.1/8080
176-
&& echo -e "HEAD /realms/openvpn-auth-oauth2/.well-known/openid-configuration HTTP/1.1\r\nHost: localhost:8080\r\nConnection: close\r\n\r\n" >&5
177-
&& grep -q "HTTP/1.1 200 OK" - <&5
169+
test: >-
170+
exec 5<>/dev/tcp/127.0.0.1/8080
171+
&& echo -e "HEAD /realms/openvpn-auth-oauth2/.well-known/openid-configuration HTTP/1.1\r\nHost: localhost:8080\r\nConnection: close\r\n\r\n" >&5
172+
&& grep -q "HTTP/1.1 200 OK" - <&5
178173
interval: 30s
179174
timeout: 10s
180175
retries: 4

internal/oauth2/types/errors.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,5 @@ import (
55
)
66

77
var (
8-
ErrNoIDToken = errors.New("no id_token provided")
98
ErrInvalidClaimType = errors.New("invalid claim type")
109
)

0 commit comments

Comments
 (0)