Skip to content

Latest commit

 

History

History

orca

Orca

ORganization Contact Acquirement

The orca or killer whale (Orcinus orca) is a toothed whale belonging to the oceanic dolphin family, of which it is the largest member. It is the only extant species in the genus Orcinus and is recognizable by its black-and-white patterned body.

Orca is registration processor and members management system with Web API.

Orca is web server based service build in Rust programming language.

Setup

Orca connects to database maintained by Gray Whale. Make sure you have configured gray whale before starting to work with Orca.

Dependecies

Make sure you have these dependecies installed on your machine:

  • rustup to manage rustc and cargo
  • open-ssl C library for TLS implementation
  • xelatex executable for printing PDF from TeX

Configuration

Copy example configuration file

cp Rocket.example.toml Rocket.toml

Please refer to example configuration file and rocket documentation for documentation on configuration.

We also use cargo features for compile time configuration like:

cargo build --features proxy-support

Keycloak Authorization

Configure keycloak to enable administration APIs:

# Part of Rocket.toml
keycloak_host = "https://keycloak.ictunion.cz"
keycloak_realm = "testing-members"
keycloak_client_id = "orca"

If you don't want to have administration features simply don't set these values. Orca can run without keycloak but it won't allow any administration API to be used.

Roles

The permissions to many admin features are granular. Orca is using Keycloak's client roles which needs to be configured for the keycloak_client_id set in the Rocket.toml:

Role Name Ability Description
list-applications List of applications/registrations in various state
view-application Access detail of individual applications (by uuid)
resolve-applications Resolve (Accept / Reject) applications
list-members List of all past and current members
view-member Accept detail of individual member (by uuid)
manage-members Manage (Create, Remove) members
super-powers Dangerous actions like hard delete of data

Developing

Toolchain

We use stable toolchain for rust. If you're using rustup you can ensure the right tooling using:

rustup default stable

or that your toolchain is up to date:

rustup update

Libraries

Orca uses Cargo as a build tool. Main dependecies are:

Generate Documentation for all dependecies and code:

cargo doc --open

Running project

Run server on your machine:

cargo run

Run tests:

cargo test

Documentation

We use Rusts build in documetation capabilities for documenting implementation and settings. Use cargo to build the up to date documentation:

cargo doc --open