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

config.yaml in source code is missing #3

Open
cugwhzenith opened this issue Mar 30, 2023 · 4 comments
Open

config.yaml in source code is missing #3

cugwhzenith opened this issue Mar 30, 2023 · 4 comments

Comments

@cugwhzenith
Copy link

zenith@LAPTOP-ZENITH:~/openspa/artifacts$ ./openspa_linux_amd64 server start
3:28PM FTL Failed to read config file error="open config.yaml: no such file or directory"

openspa server run err because of a lack of config.yaml

ps: I would appreciate it very much if README.md could be more specific : )

@greenstatic
Copy link
Owner

I haven't yet written the documentation for the project yet, part of which would be the example server config file.

The server config schema can be found here in the source code: https://github.com/greenstatic/openspa/blob/dev/internal/server_config.go

Here is an example server config.yaml that I used for testing:

server:
  ip: "0.0.0.0"
  port: 22211

  requestHandlers: 100

  http:
    enable: true
    ip: "0.0.0.0"
    port: 22212

firewall:
  backend: "iptables"
  iptables:
    chain: "OPENSPA-ALLOW"


authorization:
  backend: "simple"
  simple:
    # Valid units are "s", "m", "h"; seconds, minutes and hours respectively
    duration: "30s"

crypto:
  cipherSuitePriority:
    - "CipherSuite_RSA_SHA256_AES256CBC"

  rsa:
    client:
      publicKeyLookupDir: "/home/ubuntu/openspa/authorized_keys"
    server:
      privateKeyPath: "/home/ubuntu/openspa/server_private.key"
      publicKeyPath: "/home/ubuntu/openspa/server_public.key"

Note:

  • The ADK (and XADK) feature is not enabled in this config
  • You will need to create a client and server pair of RSA keys (hence the paths)
  • The publicKeyLookupDir is the path to a directory which contains files with client's public keys (the file name is the client's Client UUID)
    func (p PublicKeyLookupDir) LookupPublicKey(clientUUID string) (crypt.PublicKey, error) {
  • The client also needs a config file, the schema can be found here https://github.com/greenstatic/openspa/blob/dev/internal/ospa.go
  • Currently the only sort of documentation or rather written text for the new version of OpenSPA (v2) is my master thesis available here: https://repozitorij.uni-lj.si/IzpisGradiva.php?id=142965&lang=eng (note this is not documentation for the software, but describes what the software does, e.g. what is ADK & XADK)

@cugwhzenith
Copy link
Author

cugwhzenith commented Mar 31, 2023

it works as mentioned !

@greenstatic
Copy link
Owner

V1 and V2 implementations of the client and server are completely different. They are not backwards compatible. In v1 the protocol schema is static while in v2 the protocol schema is based around TLV. Essentially v2 is a complete re-write.
Sending v1 client request to a v2 server will not work.

I see you have updated your comment now :)

@cugwhzenith
Copy link
Author

Thanks a lot for your patience : )

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

No branches or pull requests

2 participants