;; disfluid, implementation of the Solid specification ;; Copyright (C) 2021 Vivien Kraus ;; This program is free software: you can redistribute it and/or modify ;; it under the terms of the GNU Affero General Public License as ;; published by the Free Software Foundation, either version 3 of the ;; License, or (at your option) any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU Affero General Public License for more details. ;; You should have received a copy of the GNU Affero General Public License ;; along with this program. If not, see . (define-module (vkraus systems test) #:use-module (gnu) #:use-module (guix gexp) #:use-module (gnu packages certs) #:use-module (vkraus packages disfluid) #:use-module (vkraus services disfluid)) (define full-configuration `((use-modules (webid-oidc server endpoint) (webid-oidc server endpoint resource-server) (webid-oidc server endpoint identity-provider) (webid-oidc server endpoint client) (webid-oidc oidc-configuration) (oop goops)) (make #:routed (list (make #:host "alice.localhost" #:oidc-discovery (make #:path "/.well-known/openid-configuration" #:configuration (make #:jwks-uri "http://alice.localhost/keys" #:authorization-endpoint "http://alice.localhost/authorize" #:token-endpoint "http://alice.localhost/token")) #:authorization-endpoint (make #:path "/authorize" #:subject "http://alice.localhost/profile/card#me" #:encrypted-password ,(crypt "alice" "$6$.salt.for.Alice.") #:key-file "/var/lib/disfluid/alice/key.jwk") #:token-endpoint (make #:path "/token" #:issuer "http://alice.localhost" #:key-file "/var/lib/disfluid/alice/key.jwk") #:jwks-endpoint (make #:path "/keys" #:key-file "/var/lib/disfluid/alice/key.jwk") #:default (make #:backend (make #:server-name "http://alice.localhost" #:owner "http://alice.localhost/profile/card#me") #:server-uri "http://alice.localhost")) (make #:host "bob.localhost" #:oidc-discovery (make #:path "/.well-known/openid-configuration" #:configuration (make #:jwks-uri "http://bob.localhost/keys" #:authorization-endpoint "http://bob.localhost/authorize" #:token-endpoint "http://bob.localhost/token")) #:authorization-endpoint (make #:path "/authorize" #:subject "http://bob.localhost/profile/card#me" #:encrypted-password ,(crypt "bob" "$6$And.salt.for.Bob") #:key-file "/var/lib/disfluid/bob/key.jwk") #:token-endpoint (make #:path "/token" #:issuer "http://bob.localhost" #:key-file "/var/lib/disfluid/bob/key.jwk") #:jwks-endpoint (make #:path "/keys" #:key-file "/var/lib/disfluid/bob/key.jwk") #:default (make #:backend (make #:server-name "http://bob.localhost" #:owner "http://bob.localhost/profile/card#me") #:server-uri "http://bob.localhost")) (make #:host "client.localhost" #:client-id "https://client.localhost/id" #:redirect-uris '("https://client.localhost/authorized") #:client-name "Local Client Application" #:client-uri "https://client.localhost/about" #:grant-types '(authorization_code refresh_token) #:response-types '(code)))))) (operating-system (host-name "disfluid-test-system") (hosts-file (plain-file "hosts" "127.0.0.1 localhost alice.localhost bob.localhost ::1 localhost alice.localhost bob.localhost ")) (users %base-user-accounts) (packages `(,disfluid ,nss-certs ,@%base-packages)) (services (append (list (service disfluid-service-type (disfluid-configuration (complete-corresponding-source "http://ccs.local/disfluid.tar.gz") (configuration (scheme-file "disfluid-configuration.scm" full-configuration)) (port 8080)))) %base-services)) (timezone "Europe/Paris") (bootloader (bootloader-configuration (bootloader grub-efi-bootloader) (targets '("/boot/efi")))) (mapped-devices '()) (file-systems `(,(file-system (mount-point "/") (device "/dev/sda") (type "ext4")) ,@%base-file-systems)))