Giter Site home page Giter Site logo

grapheneos / attestationserver Goto Github PK

View Code? Open in Web Editor NEW
97.0 12.0 45.0 2.93 MB

attestation.app remote attestation server. Server code for use with the Auditor app: https://github.com/GrapheneOS/Auditor. It provides two services: submission of attestation data samples and a remote attestation implementation with email alerts to go along with the local implementation based on QR code scanning in the app.

Home Page: https://attestation.app/

License: MIT License

Java 73.49% JavaScript 6.46% HTML 16.52% CSS 1.50% Shell 2.02%
security attestation cryptography verifiedboot remote-attestation hsm android monitoring grapheneos strongbox

attestationserver's People

Contributors

cosmicproc avatar dependabot[bot] avatar flawedworld avatar girlbossceo avatar lberrymage avatar maade93791 avatar matchboxbananasynergy avatar orazioedoardo avatar quh4gko8 avatar shepherd115 avatar tedgravlin avatar thestinger avatar welteam avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

attestationserver's Issues

NULL pointer dereference in sqlite4java

Can't seem to get passed SIGSEGV (0xb) at pc=0x000000000000d7c6, pid=30, tid=31

I probably did do something wrong with the database. But I am not sure how to setup the configuration. Or possibly compiled with a wrong OpenJDK ( i am using 12)

This is what I did:

sqlite3 attestation.db "CREATE TABLE Configuration(key, value)"
sqlite3 attestation.db "INSERT INTO Configuration VALUES ('emailUsername', '$EMAIL_USERNAME'), ('emailPassword', '$EMAIL_PASSWORD'), ('emailHost', '$EMAIL_HOST'), ('emailPort', '$EMAIL_PORT')"

This is the stacktrace:

Current thread (0x0000555b2c459000):  JavaThread "main" [_thread_in_native, id=31, stack(0x00007fd5d3c25000,0x00007fd5d3d25ab0)]

Stack: [0x00007fd5d3c25000,0x00007fd5d3d25ab0],  sp=0x00007fd5d3d246f8,  free space=1021k
Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  0x000000000000d7c6
C  [libsqlite4java-linux-amd64-1.0.392.so+0x4ee50]  pager_write+0x370
C  [libsqlite4java-linux-amd64-1.0.392.so+0x68fcd]  sqlite3BtreeSetVersion+0x9d
C  [libsqlite4java-linux-amd64-1.0.392.so+0x773e2]  sqlite3VdbeExec+0x9142
C  [libsqlite4java-linux-amd64-1.0.392.so+0x78741]  sqlite3_step+0x2f1
C  [libsqlite4java-linux-amd64-1.0.392.so+0x7cf87]  sqlite3_exec+0xd7
C  [libsqlite4java-linux-amd64-1.0.392.so+0xa271f]  Java_com_almworks_sqlite4java__1SQLiteManualJNI_sqlite3_1exec+0x8f
j  com.almworks.sqlite4java._SQLiteManualJNI.sqlite3_exec(JLjava/lang/String;[Ljava/lang/String;)I+0
j  com.almworks.sqlite4java._SQLiteManual.sqlite3_exec(Lcom/almworks/sqlite4java/SWIGTYPE_p_sqlite3;Ljava/lang/String;[Ljava/lang/String;)I+32
j  com.almworks.sqlite4java.SQLiteConnection.exec(Ljava/lang/String;)Lcom/almworks/sqlite4java/SQLiteConnection;+86
j  app.attestation.server.AttestationServer.open(Lcom/almworks/sqlite4java/SQLiteConnection;Z)V+35
j  app.attestation.server.AttestationServer.main([Ljava/lang/String;)V+13
v  ~StubRoutines::call_stub
V  [libjvm.so+0x853bf2]  JavaCalls::call_helper(JavaValue*, methodHandle const&, JavaCallArguments*, Thread*)+0x3c2
V  [libjvm.so+0x8cd649]  jni_invoke_static(JNIEnv_*, JavaValue*, _jobject*, JNICallType, _jmethodID*, JNI_ArgumentPusher*, Thread*) [clone .isra.68] [clone .constprop.221]+0x2a9
V  [libjvm.so+0x8cfa84]  jni_CallStaticVoidMethod+0x164
C  [libjli.so+0x4c4e]  JavaMain+0x9ce

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  com.almworks.sqlite4java._SQLiteManualJNI.sqlite3_exec(JLjava/lang/String;[Ljava/lang/String;)I+0
j  com.almworks.sqlite4java._SQLiteManual.sqlite3_exec(Lcom/almworks/sqlite4java/SWIGTYPE_p_sqlite3;Ljava/lang/String;[Ljava/lang/String;)I+32
j  com.almworks.sqlite4java.SQLiteConnection.exec(Ljava/lang/String;)Lcom/almworks/sqlite4java/SQLiteConnection;+86
j  app.attestation.server.AttestationServer.open(Lcom/almworks/sqlite4java/SQLiteConnection;Z)V+35
j  app.attestation.server.AttestationServer.main([Ljava/lang/String;)V+13
v  ~StubRoutines::call_stub

siginfo: si_signo: 11 (SIGSEGV), si_code: 1 (SEGV_MAPERR), si_addr: 0x000000000000d7c6

add configuration option for frequency of attestation failure emails

In the user interface it is possible to set both the attestation time period check (4 hours) and the amount of time without an attestation that can pass before a failure alert is sent (48 hours).

I had my handset off for two days and started receiving attestation failure e-mails every 15 minutes. It would be nice if that was configurable.

attestation

consider adding a database connection pool

It might not be a good idea to have all these short-lived connections, especially with the way WAL is intended to work. There's currently no need to use more than SQLite and it makes development much easier, but it should probably use it more efficiently.

support changing username

The userId is already the primary key with the username only used for authentication so it will be easy to change.

throttle alerts

The last time an alert was sent for a device not providing attestations in time should be recorded and used to throttle the alerts. New devices with failures should still send out alerts immediately, and they might as well still include the full list of applicable devices.

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.