Giter Club home page Giter Club logo

onyxmoon / optolith-cloud Goto Github PK

View Code? Open in Web Editor NEW
5.0 2.0 0.0 4.81 MB

This repository contains the development data of the server for a cloud infrastructure service for Optolith Character Generator (https://github.com/elyukai/optolith-client).

Home Page: https://cloud.optolith.app

License: Mozilla Public License 2.0

PHP 21.81% HTML 8.02% CSS 69.80% JavaScript 0.37%
tde dsa dsa5 server api-server cloud-infrastructure-service cloud database thedarkeye dasschwarzeauge

optolith-cloud's People

Contributors

onyxmoon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

optolith-cloud's Issues

Implement security for MediaObject entities

The MediaObject entity should meet the following security requirements in conjunction with the API platform

  • Can be created at any time with a valid session
  • The logged-in user is automatically recorded as the owner of the created MediaObject
  • The query of the image should only be possible for the owner or administrator.

Implement security for User entities

The User Entity should meet the following security requirements in conjunction with the API platform

  • Can be created at any time
  • The user must not be activated by default
  • The e-mail address must not be validated by default
  • Changes only by the user himself (valid session) or administrators
  • Delete only by the user himself (valid session) or administrators
  • Email address and password changes only with valid session and additional confirmation with the current password.
  • The user has read-only access to attributes relating to the activation and validation process of the account and e-mail address.
  • Administrators may also have write access to attributes related to the activation and validation process of the account and email address, for example to perform manual activations.

Adding entity for media object

Media objects like images for users and heroes shouldn't be embedded in their respective entity, because of the encoding and persisting of binary data in databases is very inefficient and encoding costs up to 20% more space.

The storage should be done as an API-supported file upload so that other entities should not process the images. Entities that require media data can thus reference one or more MediaObjects. This can be efficiently provided by the web server as a static file, while only a reference of the relative position of the image needs to be stored in the database. This reference should be communicated to the client so that the client can obtain the image in a suitable way. This also ensures that the image data only has to be loaded by the client in case of any changes and that not always the entire image information is provided encoded, for example in the queried user or character entity.

Adding entity for character

In the first implementation, the character of a user should provide the JSON hero data. The server should automatically maintain the last modification date when a hero is created or updated, to prevent clients that are working with an incorrect time from causing inconsistencies. The owner of a hero should be automatically assigned based on the user session. Avatar and name should be stored as additional meta-data (therefore outside of the JSON hero data) in the database, as they may be needed for preview purposes.

It should be considered if a kind of checksum is created using the hero JSON data to quickly capture changes. But maybe the last change time is already exact enough for this purpose.

Prevent user from login in which do not meet certain conditions

Implementation of a custom UserChecker, which checks after authentication if the user is authorized to use services. The return to clients after the failure of such a general authorization should give information about the reason why authorization for use is denied after successful authentication. This includes reasons such as a non-activated user account, for example, because the account activation email was not confirmed by the user.

Forgot / reset password function

Problem
Users should be able to reset their password.

The functionality does not need to be included in the API, as this is not necessarily a CRUD operation.

Possible Solution
A route respectively a controller must accept the email address (the unique identifier) and then send an email with a secret that ensures that the user can reset his password.

Whether the reset is done with a confirmation code/AppURL in a client or a form opened in the browser must be decided.

Alternative Solution
Alternatively, the e-mail can also contain a link that sets a temporary password after confirmation. This password will be sent to the user again by e-mail and the user can change it after successful login.

Add controller for handling email confirmations

Should providing a routing endpoint for confirmation of both accounts an emails.
Also should implementing the sending of confirmation mails in user-dependent languages.

The controller should be available as a service to inject it in other actions or controllers, for example, to trigger sending of confirmation emails.

Implement symfony json_login as JSON Authentication Endpoint for api authentification

The user is supposed to identify himself via a POST request with a JSON body containing the credentials. As return a httpOnly cookie is to be used, which from then on should be sent back by the client to confirm the session.

This is to be done with regard to the fact that httpOnly cookies cannot be accessed via JavaScript.
This type of cookie is automatically sent with every request, but is not readable in JavaScript, which makes it safe from theft by other JavaScript.

Implementation of translation service

An application-wide translation service should be used to provide translations for emails and other pages. The api docs haven't to be translated.

Add an admin area

The admin area should provide an overview of the collected data and allow necessary changes to them. In the future, the management of additional functions such as status/maintenance management and the control of API functions would be possible. Therefore this should be considered in preparation for this.

Implement security for Character entities

The character entity should meet the following security requirements in conjunction with the API platform

  • Can be created at any time with a valid session
  • The logged-in user is automatically registered as owner of the created character
  • Only the owner or administrator should be able to query the character.
  • Only the owner or administrator should be able to delete the character.
  • Only the owner or administrator should be able to change the character.

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.