You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
2.3 KiB

5 years ago
## forum-security
### Objectives
You must follow the same [principles](../README.md) as the first subject.
5 years ago
For this project you must take into account the security of your forum.
- You should implement a Hypertext Transfer Protocol Secure ([HTTPS](https://developer.mozilla.org/pt-BR/docs/Glossary/https)) protocol :
5 years ago
5 years ago
- Encrypted connection : for this you will have to generate an SSL certificate, you can think of this like a identity card for your website. You can create your certificates or use "Certificate Authorities"(CA's)
- We recommend you to take a look into [cipher suites](https://en.wikipedia.org/wiki/Cipher_suite).
5 years ago
- The implementation of [Rate Limiting](https://en.wikipedia.org/wiki/Rate_limiting) must be present on this project
- You should encrypt :
- Clients passwords.
- Database, for this you will have to create a password for your database.
Sessions and cookies were implemented in the [previous project](../README.md) but not under-pressure (tested in an attack environment). So this time you must take this into account.
- Clients session cookies should be unique. For instance, the session state is stored on the server and the session should present an unique identifier. This way the client has no direct access to it. Therefore, there is no way for attackers to read or tamper with session state.
5 years ago
### Hints
- You can take a look at the `openssl` manual.
5 years ago
- For the session cookies you can take a look at the [Universal Unique Identifier (UUID)](https://en.wikipedia.org/wiki/Universally_unique_identifier)
5 years ago
### Instructions
- You must handle website errors, HTTPS status.
- You must handle all sort of technical errors.
- The code must respect the [**good practices**](../../good-practices/README.md).
- It is recommended to have **test files** for [unit testing](https://go.dev/doc/tutorial/add-a-test).
5 years ago
### Allowed packages
- All [standard Go](https://golang.org/pkg/) packages are allowed.
- [sqlite3](https://github.com/mattn/go-sqlite3)
- [bcrypt](https://pkg.go.dev/golang.org/x/crypto/bcrypt)
- [UUID](https://github.com/satori/go.uuid)
- [autocert](https://pkg.go.dev/golang.org/x/crypto/acme/autocert)
This project will help you learn about :
- HTTPS
- [Cipher suites](https://en.wikipedia.org/wiki/Cipher_suite)
- Goroutines
- Channels
- Rate Limiting
- Encryption
- password
- session/cookies
- Universal Unique Identifier (UUID)