Code Monkey home page Code Monkey logo

opentakserver's Issues

XMPP

Possibly integrate XMPP server into OTS for TAK Chat etc

Update server

Could you add a way to use the server to update plugins on EUDs

No path for truststore-root.jks

While reading the code around the use of keytool
I found that truststore-root.jks is placed in its "default" location

'keytool -import -trustcacerts -file {} -keystore truststore-root.jks -alias {} -storepass {} -noprompt'

Also dude please "cd ~" not a fix, its a hack ๐Ÿฅฒ please use absolute paths <3
you kinda doing it here

command = ('cd {} && openssl ca -config {} -gencrl -keyfile {} -passin pass:{} -cert {} -out {}'

but still "cd" should not be needed.

Issue #5 could be related to truststore-root.jks is not in the OTS_CA_FOLDER folder, but looks to default to ~

'bcrypt' has no attribute '__about__' in docker

When booting/starting ots in docker for the first time I get this error.
When booting again it works fine.

I don't have an config.yml first time I boot. ots is creating the default for me

  • Python 3.12.3
  • OTS: 1.1.4
  • docker base image: python:3.12 Debian bookworm based
ots-server  | Mumble auth not supported on this platform
ots-server  | (trapped) error reading bcrypt version
ots-server  | Traceback (most recent call last):
ots-server  |   File "/app/.opentakserver_venv/lib/python3.12/site-packages/passlib/handlers/bcrypt.py", line 620, in _load_backend_mixin
ots-server  |     version = _bcrypt.__about__.__version__
ots-server  |               ^^^^^^^^^^^^^^^^^
ots-server  | AttributeError: module 'bcrypt' has no attribute '__about__'

Python keystore over Java

Hi,

Would be nice if we could drop the javascript dependency for keytool :)
I'm no python programmer but found this :)

Pure-Python Java Keystore (JKS) library
https://pypi.org/project/pyjks/
https://pyjks.readthedocs.io/en/latest/

Manly asking so I don't need to include Java in the docker image I'm building for OTS.

There is a big difference in docker image size

ots based on python:3.12-slim = 413MB (Just have python)
ots based on python:3.12 = 1.96GB (need for build tools and JRE)

Support for groups

Hi

Would love support for groups / group filter since my primary use for civtak is airsoft milsim and larping in my basement ๐Ÿ˜…๐Ÿฅณ

So the option to create groups / teams would be greatly appreciated โ™ฅ๏ธ

Example:

  • Team blue can only see blue
  • Team red can only see red
  • Game master can see all

OG tak server groups
https://mytecknet.com/managing-users-and-groups/#intro-to-groups

Certificate authority creation fails on Windows

[2024-04-21 10:36:53] - OpenTAKServer[5656] - certificate_authority - INFO - Creating CA...
..+.+..+..........+..+....+.....+.........+.+..+....+.....+...+...............+.............+...+......+.....+......+...+.+.....+.+............+......+..+..........+..+.+.........+......+..............+.+..+..................+.+...........+....+...+...+.....+...+.+......+...............+..+++++++++++++++++++++++++++++++++++++++*.+.+......+..+...+++++++++++++++++++++++++++++++++++++++*...+..+....+...........+..........+........+..........+...+.....+...................+.....+...+.......+.....+......+...+..........+..+...+......+.+..+.+.........+..+................+..+.+.....+..........+.....+.+......+...+..+....+.....+...+.......+...+........+.......+........+....+.........+.....+............+...+.........+.+.....+.......+............+...........+.+......+........+....+...+..+............+....+............+...+...........+.+..+.+.....+......+...+...+....+.....+...+............++++++
.....+....+..+..........+...+......+..+....+......+++++++++++++++++++++++++++++++++++++++*............+++++++++++++++++++++++++++++++++++++++*.+...+..+..........+.................+.+..............+.+..+...+......+..................+.+.....+....+........+...+.+.........+.........+..+...+..........+......+.........+.....+...+...................+.........+..+...+.......+............+........+...............+....+........+.......+...........+.........+..................+.......+...+...+.....+...+....+...........+.......+...+..............+...+...+.......+..+......+.......+...+...........+...+.+..+.......+..+......+.......+..+....+..+.......+...+............+..+..........+...+......+..+...+....+..+...+.......+.....+....+...........+...............+..................+................+............+.........+.....+...+.+...........+.+..+..........+..+.+..+...+...+....+...+...+.........+..+....+......+...........+....+...+.....+...+..................+......+...+.............+..+..........+..+.+.....+.........+......+............+.+......+......+.....+....+...+......+......+.........+.........+........+.......+......+...............+...........+....+..+...+.......+............+..+...+............+....+......+.....+......+...+.+...+..+.+.....+...+....+............+........+......+.+......+............+...+..+......+......+.+..+......+.......+.........+.........+...........+.+...+......+..............+.......+..+......+.+.....+..................+.............+..+...+...+............+...+......+...+...............+.+.........+...+...+..+...+.+.....+.+..............+....+..+.......+.....+.......+.....+....+..+...+....+........+.............+..+.......+...+..+.......+.....+.+.........+......+.....+..........++++++
-----
Providers:
  default
    name: OpenSSL Default Provider
    version: 3.3.0
    status: active
Picked up _JAVA_OPTIONS: -Xmx2048M
Certificate was added to keystore
Using configuration from C:\Users\NotAdmin\ots\ca\ca_config.cfg
...+...+...+..+......................+.....+...+...+....+......+.....+....+.....+++++++++++++++++++++++++++++++++++++++*..+...+.+.........+.....+..................+.........+.+..+...+....+++++++++++++++++++++++++++++++++++++++*....+...+.......+..+...+....+...+.....+...+....+........+.+..+...+.+.........+......+.....+....+..+.........+.........+.+...+........+.........+....+.........+..+.........+.+........+.............+..+......+...............+.......+..+..................+...+....+...+.........+...+..+....+.........+...+...+.....+................+.....+...+...+....+..............+....+..+.............+...+.....+.........................+..+...+.......+..+...+.+.................+...+......+...+...++++++
...........+.............+..+....+..+...+....+..+.+..+.+.........+.....+......+++++++++++++++++++++++++++++++++++++++*.........+..+......+.............+..+.......+...+...+.....+.+.....+++++++++++++++++++++++++++++++++++++++*...+...+............+.......................+.............+.....+.........+.+...........+.+..+.+.....+....+..+.+..+.......+.........+.........+.................+....+..+...+.+......+.....+...+......+...+............++++++
-----
Certificate request self-signature ok
subject=C=WW, ST=XX, L=YY, O=ZZ, OU=OpenTAKServer, CN=opentakserver
Providers:
  default
    name: OpenSSL Default Provider
    version: 3.3.0
    status: active
The system cannot find the path specified.
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\users\notadmin\ots\.venv\Lib\site-packages\opentakserver\app.py", line 198, in <module>
    app = create_app()
          ^^^^^^^^^^^^
  File "C:\users\notadmin\ots\.venv\Lib\site-packages\opentakserver\app.py", line 173, in create_app
    init_extensions(app)
  File "C:\users\notadmin\ots\.venv\Lib\site-packages\opentakserver\app.py", line 79, in init_extensions
    ca.create_ca()
  File "C:\users\notadmin\ots\.venv\Lib\site-packages\opentakserver\certificate_authority.py", line 119, in create_ca
    self.issue_certificate("opentakserver", True)
  File "C:\users\notadmin\ots\.venv\Lib\site-packages\opentakserver\certificate_authority.py", line 200, in issue_certificate
    raise Exception("Failed to import key. Exit code {}".format(exit_code))
Exception: Failed to import key. Exit code 1

Let's Encrypt

Using Let's Encrypt certificates on the HTTPS server works fine with ATAK. Try to figure out if Let's Encrypt certs can be used for the SSL socket. Also there should be a way in the api/web ui for the user to easily get a Let's Encrypt cert if they're using a domain name.

Don't allow the @ character in passwords

When viewing RTSP streams, the url is rtsp://username:password@serveraddress:8554/path. If there is an @ symbol in the password it will cause an invalid URL. Probably should also prohibit the semicolon for the same reason.

Feature suggestion - SDR feed injection into OTS

Suggestion for adding the ability to inject various SDR feeds into OTS.

  1. RTL SDR audio listening
  2. Dump 1090 server connection to injection of ADS-B traffic
  3. APRS-IS server connection for injecting APRS traffic
  4. Proscan server connection for listening to an audio feed from a networked Uniden scanner...proscan.org

Add Traccar support

Connect to Traccar's websocket and save the tracker data it sends. Also add an API route to accept data from the Android and iOS Traccar clients directly.

Add TTL to messages published to RabbitMQ

Also add OTS_RABBITMQ_TTL option.

channel.basic_publish(
    exchange='',
    routing_key='hello_world',
    properties=pika.BasicProperties(
        expiration='60000',
    ),
    body='my message'
)

Error creating configuration data packages

Data packages are successfully created the first time the Generate Configuration Data Package button is clicked in the UI. However if the data package is deleted and the user wants to recreate it, it fails with the error below. Restarting OpenTAKServer allows the data package to be successfully recreated.

sh: 0: getcwd() failed: No such file or directory
.+.........+.+.....................+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*.......+.......+..+.+...............+..............+....+..............+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*..................+.+.........+..+...+...+.............+.........+..+.+........+.+....................+...+......+.+..................+..+.+...+..+.........+.........+.+..............+......+...............+.+...+.....+.+...+........+.........+.+...+............+..+...+.............+..+...+.+......+..+.+.........+..+....+.....+.+........+......+....+.....+.......+...+..+.+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
.........+...+...+.+......+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*..+.......+......+......+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*.......+....+..+.........+.+............+....................+.+......+.....+.............+...+..+......+.+........+......+.+......+........+......+.+.........+......+...+...............+..+..................+....+...+.....+.......+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-----
sh: 0: getcwd() failed: No such file or directory
Certificate request self-signature ok
subject=C = WW, ST = XX, L = YY, O = ZZ, OU = OpenTAKServer, CN = administrator
sh: 0: getcwd() failed: No such file or directory
Providers:
  default
    name: OpenSSL Default Provider
    version: 3.0.2
    status: active
sh: 0: getcwd() failed: No such file or directory
[2024-04-14 20:48:23] - OpenTAKServer[704041] - certificate_authority - INFO - keytool -importkeystore -deststorepass atakatak -destkeypass atakatak -destkeystore /home/administrator/ots/ca/certs/administrator/administrator.jks -srckeystore /home/administrator/ots/ca/certs/administrator/administrator.p12 -srcstoretype PKCS12 -srcstorepass atakatak -alias administrator
sh: 0: getcwd() failed: No such file or directory

/bin/sh: 1: cd: getcwd() failed: No such file or directory

Error occurred during initialization of VM
java.lang.Error: Properties init: Could not determine current working directory.
        at jdk.internal.util.SystemProps$Raw.platformProperties(java.base/Native Method)
        at jdk.internal.util.SystemProps$Raw.<init>(java.base/SystemProps.java:248)
        at jdk.internal.util.SystemProps.initProperties(java.base/SystemProps.java:54)
        at java.lang.System.initPhase1(java.base/System.java:2146)

[2024-04-14 20:48:23] - OpenTAKServer[704041] - api - ERROR - Traceback (most recent call last):
  File "/home/administrator/.opentakserver_venv/lib/python3.10/site-packages/opentakserver/blueprints/api.py", line 233, in certificate
    filenames = ca.issue_certificate(username, False)
  File "/home/administrator/.opentakserver_venv/lib/python3.10/site-packages/opentakserver/certificate_authority.py", line 199, in issue_certificate
    raise Exception("Failed to import key. Exit code {}".format(exit_code))
Exception: Failed to import key. Exit code 1

Api Invalid Token

I am building a new Frontend for the ots api but at each turn i am getting "invalid token" and "unauthorized as response"

what could be the issue i habve attached my code below. This smae request works with postman.

export const getEUDSWithBasicAuth = async (csrfToken) => {
//console.log(csrfToken)
const username = 'administrator';
const password = 'password';
const basicAuth = 'Basic ' + btoa(username + ':' + password);

try {
const response = await api.get('/eud', {
withCredentials: true,
headers: {
'Authorization': basicAuth,
//'XSRF-TOKEN': ${csrfToken},
"XSRF-TOKEN":"ImI5N2ExZTVkZWM5YTVmZWFkYTE0ZmFlMzIzNWRkODA5YTcwODFlMDgi.ZmqvSw.YnmEd_Qx1iYASXa1QdD-ISUB-KE"
}
});

print(response)

return response;

} catch (error) {
console.error("Error status:", error?.response?.status);
console.error("Error data:", error?.response?.data);
throw error;
}
};

Unable to fetch or push data packages

When connected to an opentakserver, EUD is unable to push or query data packages to/from server. Found all network connectivity settings and ensured the device was able to connect to 8443 on the server through the NGINX proxy. The EUD's return code for data package query is:

Data Package Search Failed
Socket is closed

Attempting to run this from ATAK client on two different Debian 12 opentakservers, one with Let's Encrypt certificates and one with the generated self-signed certificates.

SQLAlchemy warnings

/home/administrator/.opentakserver_venv/lib/python3.10/site-packages/opentakserver/models/EUD.py:76: SAWarning: Multiple rows returned with uselist=False for lazily-loaded attribute 'EUD.data_packages'
  'data_packages': self.data_packages.to_json(False) if include_data_packages and self.data_packages else None,
/home/administrator/.opentakserver_venv/lib/python3.10/site-packages/opentakserver/models/EUD.py:59: SAWarning: Multiple rows returned with uselist=False for lazily-loaded attribute 'EUD.certificate'
  if self.certificate and self.certificate.data_package:

Feature suggestion - User groups admin

Suggestion for adding the ability to admin users by group(s). Users can be added to one or more groups. Groups can be enabled/disabled en masse by OTS administrator.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.