Skip to content

Commit

Permalink
Reformat docs
Browse files Browse the repository at this point in the history
  • Loading branch information
locka99 committed Jul 24, 2021
1 parent 2ce4c01 commit a67327e
Show file tree
Hide file tree
Showing 8 changed files with 95 additions and 223 deletions.
39 changes: 13 additions & 26 deletions docs/compatibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

## OPC UA Binary Transport Protocol

This implementation supports the `opc.tcp://` binary protocol. Binary over `https://` is not supported although it is
conceivable that it could be supported.
This implementation supports the `opc.tcp://` binary protocol. Binary over `https://` is not supported although it is conceivable that it could be supported.

The implement will **never** implement OPC UA over XML. XML hasn't see much adoption so this is no great impediment.

Expand Down Expand Up @@ -74,29 +73,25 @@ The following services are supported in the server:

### Address Space / Nodeset

The standard OPC UA address space is exposed. OPC UA for Rust uses a script to generate code to create and
populate the standard address space. This functionality is controlled by a server build feature
`generated-address-space` that defaults to on but can be disabled if the full address space is not required.
When disabled, the address space will be empty apart from some root objects.
The standard OPC UA address space is exposed. OPC UA for Rust uses a script to generate code to create and populate the standard address space. This functionality is controlled by a server build feature
`generated-address-space` that defaults to on but can be disabled if the full address space is not required. When disabled, the address space will be empty apart from some root objects.

### Current limitations

Currently the following are not supported

* Diagnostic info. OPC UA allows for you to ask for diagnostics with any request. None is supplied at this time
* Session resumption. If your client disconnects, all information is discarded.
* Default node set is mostly static. Certain fields of server information will contain their default values
unless explicitly set.
* Default node set is mostly static. Certain fields of server information will contain their default values unless explicitly set.
* Access control is limited to setting read/write permissions on nodes that apply to all sessions.
* Multiple created sessions in a single transport.

## Client

The client API API is synchronous - i.e. you call a function that makes a request and it returns
when the response is received or a timeout occurs. Under the surface it is asynchronous so that functionality
may be exposed at some point.
when the response is received or a timeout occurs. Under the surface it is asynchronous so that functionality may be exposed at some point.

The client exposes functions that correspond to the current server supported profile, i.e. look above at the
server services and there will be client-side functions that are analogous to those services.
The client exposes functions that correspond to the current server supported profile, i.e. look above at the server services and there will be client-side functions that are analogous to those services.

In addition to the server services above, the following are also supported.

Expand Down Expand Up @@ -140,11 +135,9 @@ The server and client support the following user identity tokens

## Crypto

OPC UA for Rust uses cryptographic algorithms for signing, verifying, encrypting and decrypting data. In addition
it creates, loads and saves certificates and keys.
OPC UA for Rust uses cryptographic algorithms for signing, verifying, encrypting and decrypting data. In addition it creates, loads and saves certificates and keys.

OpenSSL is used for encryption although it would be nice to go to a pure Rust implementation assuming a crate
delivers everything required. The crypto+OpenSSL code is isolated in an `opcua-crypto` crate.
OpenSSL is used for encryption although it would be nice to go to a pure Rust implementation assuming a crate delivers everything required. The crypto+OpenSSL code is isolated in an `opcua-crypto` crate.

You must read the [setup](./setup.md) to configure OpenSSL for your environment.

Expand All @@ -166,16 +159,10 @@ pki/

For encrypted connections the following applies:

* The server will reject the first connection from an unrecognized client. It will create a file representing
the cert in its the `pki/rejected/` folder and you, the administrator must move the cert to the `trusted/` folder
to permit connections from that client in future.
* NOTE: Signed certificates are not supported at this time. Potentially a cert signed with a trusted CA could
be automatically moved to the `trusted/` folder.
* Likewise, the client shall reject unrecognized servers in the same fashion, and the cert must be moved from the
`rejected/` to `trusted/` folder for connection to succeed.
* Servers that register with a discovery server may find the discovery server rejects their registration attempts if the
cert is unrecognized. In that case you must move your server's cert from discovery server's `rejected` to its
``trusted` folder, wherever that may be. e.g. on Windows it is under `C:\ProgramData\OPC Foundation\UA\Discovery\pki`
* The server will reject the first connection from an unrecognized client. It will create a file representing the cert in its the `pki/rejected/` folder and you, the administrator must move the cert to the `trusted/` folder to permit connections from that client in future.
* NOTE: Signed certificates are not supported at this time. Potentially a cert signed with a trusted CA could be automatically moved to the `trusted/` folder.
* Likewise, the client shall reject unrecognized servers in the same fashion, and the cert must be moved from the `rejected/` to `trusted/` folder for connection to succeed.
* Servers that register with a discovery server may find the discovery server rejects their registration attempts if the cert is unrecognized. In that case you must move your server's cert from discovery server's `rejected` to its ``trusted` folder, wherever that may be. e.g. on Windows it is under `C:\ProgramData\OPC Foundation\UA\Discovery\pki`

There are switches in config that can be used to change the folder that certs are stored and to modify
the trust model.
Expand Down
20 changes: 6 additions & 14 deletions docs/cross-compile.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
# Cross-compiling OPC UA for Rust

The Raspberry Pi will be used as the target device for this document. If you have
another target, e.g. some `bitbake` concoction, then you will have to adapt the instructions
accordingly.
The Raspberry Pi will be used as the target device for this document. If you have another target, e.g. some `bitbake` concoction, then you will have to adapt the instructions accordingly.

Cross compilation is described in two ways - one that uses the `cross` tool and one that is manual. Depending on your needs you may decide on one
or the other.
Cross compilation is described in two ways - one that uses the `cross` tool and one that is manual. Depending on your needs you may decide on one or the other.

## Build with Cross

Expand All @@ -23,30 +20,25 @@ Install [cross](https://github.com/rust-embedded/cross) for Rust.
$ cargo install cross
```

Install the tool according its own instructions. Ensure your docker permissions are
set. Now you can use `cross` in place of `cargo`. e.g.
Install the tool according its own instructions. Ensure your docker permissions are set. Now you can use `cross` in place of `cargo`. e.g.

```
$ cross build --all --target armv7-unknown-linux-gnueabihf
```

The additional argument `--target armv7-unknown-linux-gnueabihf` tells `cross` to set up a build environment
before invoking `cargo`.
The additional argument `--target armv7-unknown-linux-gnueabihf` tells `cross` to set up a build environment before invoking `cargo`.

### SELinux conflict

The `cross` tool may have an [issue](https://github.com/rust-embedded/cross/issues/112) running `cargo` on
Fedora / Red Hat dists due to a SELinux policy. Read the bug for a workaround.
The `cross` tool may have an [issue](https://github.com/rust-embedded/cross/issues/112) running `cargo` on Fedora / Red Hat dists due to a SELinux policy. Read the bug for a workaround.

## Manual build

The manual process gives you complete control on the build process but requires a bit more work.

### Credit

A [bug](https://github.com/locka99/opcua/issues/24) was raised asking how to
cross-compile OPC UA for Rust and someone kindly answered with references. The links below were
used to produce a working solution:
A [bug](https://github.com/locka99/opcua/issues/24) was raised asking how to cross-compile OPC UA for Rust and someone kindly answered with references. The links below were used to produce a working solution:

1. Install cross-compile utilities as shown [here](https://github.com/sodiumoxide/sodiumoxide)
2. Follow malbarbo's answer [here](https://stackoverflow.com/questions/37375712/cross-compile-rust-openssl-for-raspberry-pi-2)
Expand Down
Loading

0 comments on commit a67327e

Please sign in to comment.