# Enroll

The objective of this repo is to provide guidance on how to enroll in the EMERALD project, or any other project that uses git.code.tecnalia.com as a repository.

In order to enroll a project such as EMERALD, you need to follow the next steps:

* register in git.code.tecnalia.com with orein
* login to git.code.tecnalia.com
* request access to the project responsible

## Register in git.code.tecnalia.com with orein
First of all you have to create an account in git.code.tecnalia.com so that you can be added latter to a project. In order to create an account:

* Access to Orein
* Register account
* Activate 2fa
    * Activate authenticator
    * Copy recovery codes
* Confirm email
* Login

To log in go to the root url of the gitlab repository [htts://git.code.tecnalia.com/](https://git.code.tecnalia.com/) as an external user or click `Sign in` if you are in another page ( i.e. https://git.code.tecnalia.com/groups/emerald ).

![Anonym access](.media/image01.png)

In both ways you will reach the login page. 

![Anonym login page](.media/image02.png)

There you have three options to log in:
* LDAP
* Standard
* Orein OpenID

As an external user you have to use the Orein OpenID option. Click on the Orein OpenID button and you will be redirected to the Orein login page.

![Orein login page](.media/image03.png)

Orein login page offers different options.
1. Register an account on orein
2. Login with an active account on orein
3. Use an identity provider as
    * github
    * Google
    * Microsoft
    * Amazon
4. Use a [FIDO2](https://fidoalliance.org/fido2/)
5. Use a Tecnalia account
6. And reocover the orein account password if you have forgotten it.

External users can use the first four options. we will address the registering process in this guide. Click on the `Register (1)` button. 

![Register Page](.media/image04.png)

To register we require email and password with some complexity.

![Password Complexity](.media/image05.png)

Immediately, you are going to be asked to configure the `2FA` two factor authentication. Which is mandatory for all users in git.code.tecnalia.com.

![2FA](.media/image06.png)

Following the instructions you should configure your Authenticator app. In this case we show the process with the [Microsoft Authenticator](https://play.google.com/store/apps/details?id=com.azure.authenticator&hl=es&gl=US) app. But you can use any other app that supports the TOTP protocol such as [Google Authenticator](https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2&hl=es&gl=US) or [Authy](https://play.google.com/store/apps/details?id=com.authy.authy&hl=es&gl=US).

![MSAutheticator01](.media/image07.png)![MSAutheticator02](.media/image08.png)![MSAutheticator03](.media/image09.png)![MSAutheticator04](.media/image10.png)![MSAutheticator05](.media/image11.png)![MSAutheticator06](.media/image12.png)

That number should be used to confirm the 2FA configuration.

![2FA comfirm code](.media/image13.png)

Once validated the 2FA you will be shown the recovery codes. 

![Recovery code](.media/image14.png)

**Important**: **Copy Authentication recovery codes** in a secure place. These are required in case you lost the authenticator. The can be also used to login in case you have forgotten the password and you need to reset it.

![2FA Configured](.media/image15.png)
Comfirm email (Beware of spam)

![Comfirm email](.media/image16.png)
![Confirmation page](.media/image17.png)
![Spam](.media/image18.png)

## login to git.code.tecnalia.com

To login using orein you have to click on the Orein OpenID button and you will be redirected to the Orein login page. There you have to use the first (2) option. The number 2 in the image below.

![Orein login page](.media/image03.png)

To login

![Orein login page with data](.media/image19.png)
![2FA request](.media/image20.png)

That will drive you to the welcome page or the group page where you have clicked the login button.

![Welcome page](.media/image21.png)

## Request access to the project responsible

There are two ways to request access to the project.
- Send an email to a project owner https://git.code.tecnalia.com/groups/emerald/-/group_members
- Once you are logged in you can request access. Clicking the request access button.

![Request Access](.media/image22.png)

## Trouble shooting

In case of sign-up or sign-in issues contact project owners https://git.code.tecnalia.com/groups/emerald/-/group_members at tecnalia.