Difference between revisions of "Authentication and security"
m (Bot: Automated text replacement (-security +{{Template:Sécurité}})) |
Tag: merged edit of another user |
||
(12 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
+ | <span data-link_translate_fr_title="Authentification et sécurité" data-link_translate_fr_url="Authentification et sécurité"></span>[[:fr:Authentification et sécurité]][[fr:Authentification et sécurité]] | ||
+ | <span data-link_translate_en_title="Authentication and security" data-link_translate_en_url="Authentication and security"></span>[[:en:Authentication and security]][[en:Authentication and security]] | ||
+ | <span data-link_translate_es_title="Autenticación y seguridad" data-link_translate_es_url="Autenticación y seguridad"></span>[[:es:Autenticación y seguridad]][[es:Autenticación y seguridad]] | ||
+ | <span data-link_translate_pt_title="Autenticação e segurança" data-link_translate_pt_url="Autenticação e segurança"></span>[[:pt:Autenticação e segurança]][[pt:Autenticação e segurança]] | ||
+ | <span data-link_translate_it_title="Autenticazione e protezione" data-link_translate_it_url="Autenticazione e protezione"></span>[[:it:Autenticazione e protezione]][[it:Autenticazione e protezione]] | ||
+ | <span data-link_translate_nl_title="Verificatie en beveiliging" data-link_translate_nl_url="Verificatie en beveiliging"></span>[[:nl:Verificatie en beveiliging]][[nl:Verificatie en beveiliging]] | ||
+ | <span data-link_translate_de_title="Authentifizierung und Sicherheit" data-link_translate_de_url="Authentifizierung und Sicherheit"></span>[[:de:Authentifizierung und Sicherheit]][[de:Authentifizierung und Sicherheit]] | ||
+ | <span data-link_translate_zh_title="身份验证和安全" data-link_translate_zh_url="身份验证和安全"></span>[[:zh:身份验证和安全]][[zh:身份验证和安全]] | ||
+ | <span data-link_translate_ar_title="الأمان والمصادقة" data-link_translate_ar_url="الأمان والمصادقة"></span>[[:ar:الأمان والمصادقة]][[ar:الأمان والمصادقة]] | ||
+ | <span data-link_translate_ja_title="認証とセキュリティ" data-link_translate_ja_url="認証とセキュリティ"></span>[[:ja:認証とセキュリティ]][[ja:認証とセキュリティ]] | ||
+ | <span data-link_translate_pl_title="Uwierzytelniania i zabezpieczeń" data-link_translate_pl_url="Uwierzytelniania i zabezpieczeń"></span>[[:pl:Uwierzytelniania i zabezpieczeń]][[pl:Uwierzytelniania i zabezpieczeń]] | ||
+ | <span data-link_translate_ru_title="Проверка подлинности и безопасность" data-link_translate_ru_url="Проверка подлинности и безопасность"></span>[[:ru:Проверка подлинности и безопасность]][[ru:Проверка подлинности и безопасность]] | ||
+ | <span data-link_translate_ro_title="Autentificare și securitate" data-link_translate_ro_url="Autentificare și securitate"></span>[[:ro:Autentificare și securitate]][[ro:Autentificare și securitate]] | ||
+ | <span data-link_translate_he_title="אבטחה ואימות" data-link_translate_he_url="אבטחה ואימות"></span>[[:he:אבטחה ואימות]][[he:אבטחה ואימות]] | ||
+ | <br />This article has been created by an automatic translation software. You can view the article source [[:fr:Authentification et sécurité|here]].<br /><span data-translate="fr"></span><br /> | ||
+ | <span data-link_translate_fr_title="Authentification et sécurité" data-link_translate_fr_url="Authentification et sécurité"></span>[[:fr:Authentification et sécurité]][[fr:Authentification et sécurité]] | ||
+ | <span data-link_translate_he_title="אבטחה ואימות" data-link_translate_he_url="%D7%90%D7%91%D7%98%D7%97%D7%94+%D7%95%D7%90%D7%99%D7%9E%D7%95%D7%AA"></span>[[:he:אבטחה ואימות]][[he:אבטחה ואימות]] | ||
<span data-link_translate_ro_title="Autentificare și securitate" data-link_translate_ro_url="Autentificare+%C8%99i+securitate"></span>[[:ro:Autentificare și securitate]][[ro:Autentificare și securitate]] | <span data-link_translate_ro_title="Autentificare și securitate" data-link_translate_ro_url="Autentificare+%C8%99i+securitate"></span>[[:ro:Autentificare și securitate]][[ro:Autentificare și securitate]] | ||
+ | <span data-link_translate_ru_title="Проверка подлинности и безопасность" data-link_translate_ru_url="%D0%9F%D1%80%D0%BE%D0%B2%D0%B5%D1%80%D0%BA%D0%B0+%D0%BF%D0%BE%D0%B4%D0%BB%D0%B8%D0%BD%D0%BD%D0%BE%D1%81%D1%82%D0%B8+%D0%B8+%D0%B1%D0%B5%D0%B7%D0%BE%D0%BF%D0%B0%D1%81%D0%BD%D0%BE%D1%81%D1%82%D1%8C"></span>[[:ru:Проверка подлинности и безопасность]][[ru:Проверка подлинности и безопасность]] | ||
<span data-link_translate_pl_title="Uwierzytelniania i zabezpieczeń" data-link_translate_pl_url="Uwierzytelniania+i+zabezpiecze%C5%84"></span>[[:pl:Uwierzytelniania i zabezpieczeń]][[pl:Uwierzytelniania i zabezpieczeń]] | <span data-link_translate_pl_title="Uwierzytelniania i zabezpieczeń" data-link_translate_pl_url="Uwierzytelniania+i+zabezpiecze%C5%84"></span>[[:pl:Uwierzytelniania i zabezpieczeń]][[pl:Uwierzytelniania i zabezpieczeń]] | ||
+ | <span data-link_translate_ja_title="認証とセキュリティ" data-link_translate_ja_url="%E8%AA%8D%E8%A8%BC%E3%81%A8%E3%82%BB%E3%82%AD%E3%83%A5%E3%83%AA%E3%83%86%E3%82%A3"></span>[[:ja:認証とセキュリティ]][[ja:認証とセキュリティ]] | ||
+ | <span data-link_translate_ar_title="الأمان والمصادقة" data-link_translate_ar_url="%D8%A7%D9%84%D8%A3%D9%85%D8%A7%D9%86+%D9%88%D8%A7%D9%84%D9%85%D8%B5%D8%A7%D8%AF%D9%82%D8%A9"></span>[[:ar:الأمان والمصادقة]][[ar:الأمان والمصادقة]] | ||
+ | <span data-link_translate_zh_title="身份验证和安全" data-link_translate_zh_url="%E8%BA%AB%E4%BB%BD%E9%AA%8C%E8%AF%81%E5%92%8C%E5%AE%89%E5%85%A8"></span>[[:zh:身份验证和安全]][[zh:身份验证和安全]] | ||
<span data-link_translate_de_title="Authentifizierung und Sicherheit" data-link_translate_de_url="Authentifizierung+und+Sicherheit"></span>[[:de:Authentifizierung und Sicherheit]][[de:Authentifizierung und Sicherheit]] | <span data-link_translate_de_title="Authentifizierung und Sicherheit" data-link_translate_de_url="Authentifizierung+und+Sicherheit"></span>[[:de:Authentifizierung und Sicherheit]][[de:Authentifizierung und Sicherheit]] | ||
<span data-link_translate_nl_title="Verificatie en beveiliging" data-link_translate_nl_url="Verificatie+en+beveiliging"></span>[[:nl:Verificatie en beveiliging]][[nl:Verificatie en beveiliging]] | <span data-link_translate_nl_title="Verificatie en beveiliging" data-link_translate_nl_url="Verificatie+en+beveiliging"></span>[[:nl:Verificatie en beveiliging]][[nl:Verificatie en beveiliging]] | ||
<span data-link_translate_it_title="Autenticazione e protezione" data-link_translate_it_url="Autenticazione+e+protezione"></span>[[:it:Autenticazione e protezione]][[it:Autenticazione e protezione]] | <span data-link_translate_it_title="Autenticazione e protezione" data-link_translate_it_url="Autenticazione+e+protezione"></span>[[:it:Autenticazione e protezione]][[it:Autenticazione e protezione]] | ||
− | <span data-link_translate_pt_title=" | + | <span data-link_translate_pt_title="Autenticação e segurança" data-link_translate_pt_url="Autentica%C3%A7%C3%A3o+e+seguran%C3%A7a"></span>[[:pt:Autenticação e segurança]][[pt:Autenticação e segurança]] |
− | <span data-link_translate_es_title=" | + | <span data-link_translate_es_title="Autenticación y seguridad" data-link_translate_es_url="Autenticaci%C3%B3n+y+seguridad"></span>[[:es:Autenticación y seguridad]][[es:Autenticación y seguridad]] |
− | <span data- | + | <span data-link_translate_en_title="Authentication and security" data-link_translate_en_url="Authentication+and+security"></span>[[:en:Authentication and security]][[en:Authentication and security]] |
− | |||
− | |||
− | |||
− | |||
− | |||
<!-- Début de l'article. Placez votre texte ci-après et n'hésitez pas à personnaliser les chapitres selon votre besoin --> | <!-- Début de l'article. Placez votre texte ci-après et n'hésitez pas à personnaliser les chapitres selon votre besoin --> | ||
+ | {{#seo: | ||
+ | |title=Your page title | ||
+ | |title_mode=append | ||
+ | |keywords=these,are,your,keywords | ||
+ | |description=Authentication and security | ||
+ | |image=Uploaded_file.png | ||
+ | |image_alt=Wiki Logo | ||
+ | }} | ||
+ | ==Introduction== | ||
+ | How to '''authenticate''' the API Ikoula and policies of {{Template:Sécurité}} ? | ||
− | == | + | ==Explanations== |
− | + | Pour des raisons évidentes de {{Template:Sécurité}}, l'API Ikoula exige une ''authentication''. Celle-ci est basée sur un identifiant, un mot de passe et une signature :<br /> | |
− | + | * The ID is the email address used to connect your Ikoula account or to the extranet. The name of the parameter to pass is always <span class="notranslate">'''login'''</span> ; | |
− | + | * The password as it may be, is provided in clear text (parameter <span class="notranslate">'''password'''</span>), is encrypted via a specific function using a public key provided by Ikoula (parameter <span class="notranslate">'''crypted_password'''</span>) and Base64_encode ; | |
− | + | * The signature is generated based on the parameters supplied when calling the API (see the signature generation process ==> [[Génération_de_la_signature|Génération de la signature]]). | |
− | * The ID is the email address used | ||
− | * The password as it may be, is provided in | ||
− | * The signature is generated | ||
<br /> | <br /> | ||
− | '''These settings should always be passed in to the API | + | '''These settings should always be passed in GET to the API !''' |
<br /><br />ATTENTION :<br /> | <br /><br />ATTENTION :<br /> | ||
− | The passage of the password in clear text is provided to facilitate the | + | The passage of the password in clear text is provided to facilitate the handling of the API and serves as a debug. For your tests to the API, you can, for example, use a temporary user dedicated to these tests and authenticate you with the password in clear (see the Wiki for the creation of sous-utilisateur: https://support.ikoula.com/index-1-2-2835.html).<br /><br /> |
− | The use of encryption of password with the public key Ikoula is essential in any | + | The use of encryption of password with the public key Ikoula is essential in any production environment or non-court term.<br /> |
− | If the API calls are doomed to be used via a script or a program, we recommend creating a user dedicated to this purpose | + | If the API calls are doomed to be used via a script or a program, we recommend creating a user dedicated to this purpose rather than use your extranet user classic.<br /> |
− | + | You have two options :<br /> | |
− | * Contact our support for the creation of an extranet user | + | * Contact our support for the creation of an extranet user ; |
− | * Create a sous-utilisateur directly from the homepage of your extranet account (See the WIKI for the creation of sous-utilisateur : https://support.ikoula.com/index-1-2-2835.html) | + | * Create a sous-utilisateur directly from the homepage of your extranet account (See the WIKI for the creation of sous-utilisateur: https://support.ikoula.com/index-1-2-2835.html). |
+ | Attention à ne pas oublier '''de lui mettre les droits sur les prestations souhaitées'''. | ||
<br /><br /> | <br /><br /> | ||
− | ; | + | ;Public key encryption of the password is available at the following address: |
: https://api.ikoula.com/downloads/Ikoula.API.RSAKeyPub.pem | : https://api.ikoula.com/downloads/Ikoula.API.RSAKeyPub.pem | ||
− | ==Examples == | + | ==Examples== |
− | For this example, the login will be "ikoulasupport | + | For this example, the login will be "ikoulasupport".<br /> |
− | To encrypt the password, here is an example of a function using the key | + | To encrypt the password, here is an example of a function using the public key {{Template:IKoula}} :<br /><br /> |
<syntaxhighlight lang="php"> | <syntaxhighlight lang="php"> | ||
// Chemin local vers la clef publique téléchargée à http://api.ikoula.com/downloads/Ikoula.API.RSAKeyPub.pem | // Chemin local vers la clef publique téléchargée à http://api.ikoula.com/downloads/Ikoula.API.RSAKeyPub.pem | ||
Line 89: | Line 113: | ||
echo "Erreur lors du cryptage du mot de passe."; | echo "Erreur lors du cryptage du mot de passe."; | ||
− | |||
// ==> $password_crypt contient donc le mot de passe crypté | // ==> $password_crypt contient donc le mot de passe crypté | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | ==Conclusion == | + | ==Conclusion== |
− | Once the encrypted | + | Once the password encrypted and encrypted signature, we can do the API call with parameters (If we follow the above example) :<br /> |
− | * login = ikoulasupport | + | * login = ikoulasupport ; |
− | * crypted_password = | + | * crypted_password = base64_encode($password_crypt) ; |
− | * signature = generated | + | * signature = signature generated (see the signature generation process ==> [[Génération_de_la_signature|Génération de la signature]]). |
<br /> | <br /> | ||
− | '''NB : | + | '''NB : Don't forget to url_encoder each parameter passed !''' |
− | |||
<!-- Fin de l'article --> | <!-- Fin de l'article --> | ||
<br /><br /> | <br /><br /> | ||
− | This article | + | This article seem useful to you ? <vote /> |
− | <!-- Placez ici la catégorie à laquelle se rapporte votre article. Ex: [[Category: | + | <!-- Placez ici la catégorie à laquelle se rapporte votre article. Ex: [[Category:Contribute]] --> |
− | [[ | + | [[Catégorie:API]] |
− | |||
<!-- Gestion SEO. Indiquez les informations manquantes --> | <!-- Gestion SEO. Indiquez les informations manquantes --> | ||
+ | <br /> | ||
<comments /> | <comments /> |
Latest revision as of 12:12, 5 March 2020
fr:Authentification et sécurité
en:Authentication and security
es:Autenticación y seguridad
pt:Autenticação e segurança
it:Autenticazione e protezione
nl:Verificatie en beveiliging
de:Authentifizierung und Sicherheit
zh:身份验证和安全
ar:الأمان والمصادقة
ja:認証とセキュリティ
pl:Uwierzytelniania i zabezpieczeń
ru:Проверка подлинности и безопасность
ro:Autentificare și securitate
he:אבטחה ואימות
This article has been created by an automatic translation software. You can view the article source here.
fr:Authentification et sécurité
he:אבטחה ואימות
ro:Autentificare și securitate
ru:Проверка подлинности и безопасность
pl:Uwierzytelniania i zabezpieczeń
ja:認証とセキュリティ
ar:الأمان والمصادقة
zh:身份验证和安全
de:Authentifizierung und Sicherheit
nl:Verificatie en beveiliging
it:Autenticazione e protezione
pt:Autenticação e segurança
es:Autenticación y seguridad
en:Authentication and security
Introduction
How to authenticate the API Ikoula and policies of Security ?
Explanations
Pour des raisons évidentes de Security, l'API Ikoula exige une authentication. Celle-ci est basée sur un identifiant, un mot de passe et une signature :
- The ID is the email address used to connect your Ikoula account or to the extranet. The name of the parameter to pass is always login ;
- The password as it may be, is provided in clear text (parameter password), is encrypted via a specific function using a public key provided by Ikoula (parameter crypted_password) and Base64_encode ;
- The signature is generated based on the parameters supplied when calling the API (see the signature generation process ==> Génération de la signature).
These settings should always be passed in GET to the API !
ATTENTION :
The passage of the password in clear text is provided to facilitate the handling of the API and serves as a debug. For your tests to the API, you can, for example, use a temporary user dedicated to these tests and authenticate you with the password in clear (see the Wiki for the creation of sous-utilisateur: https://support.ikoula.com/index-1-2-2835.html).
The use of encryption of password with the public key Ikoula is essential in any production environment or non-court term.
If the API calls are doomed to be used via a script or a program, we recommend creating a user dedicated to this purpose rather than use your extranet user classic.
You have two options :
- Contact our support for the creation of an extranet user ;
- Create a sous-utilisateur directly from the homepage of your extranet account (See the WIKI for the creation of sous-utilisateur: https://support.ikoula.com/index-1-2-2835.html).
Attention à ne pas oublier de lui mettre les droits sur les prestations souhaitées.
- Public key encryption of the password is available at the following address
- https://api.ikoula.com/downloads/Ikoula.API.RSAKeyPub.pem
Examples
For this example, the login will be "ikoulasupport".
To encrypt the password, here is an example of a function using the public key ikoula :
// Chemin local vers la clef publique téléchargée à http://api.ikoula.com/downloads/Ikoula.API.RSAKeyPub.pem
define('API_PUB_KEY_PATH', dirname(__FILE__) . '/Ikoula.API.RSAKeyPub.pem');
// Fonction de cryptage du mot de passe via la clef publique Ikoula
function opensslEncryptPublic($password)
{
// Vérification de la présence de la clef publique
if(file_exists(API_PUB_KEY_PATH))
{
if(!empty($password))
{
// on récupére la clef public
$publicKey = openssl_pkey_get_public('file://'.realpath(API_PUB_KEY_PATH));
// Si il n'y a pas eu d'erreur lors de la récupération de la clef publique on continue
if ($publicKey !== FALSE)
{
// Si chiffrement clef publique OK
if(openssl_public_encrypt($password, $crypted, $publicKey) === TRUE)
{
// Renvoie du passe crypté
return $crypted;
}
else
{
return NULL;
}
}
else
return NULL;
}
else
return NULL;
}
else
{
echo("Erreur la clée public n'est pas présente.\n");
return NULL;
}
}
// Utilisation de la fonction de cryptage
$password_crypt = opensslEncryptPublic("Mot de passe non crypté");
if($password_crypt != NULL)
echo "OK Mot de passe crypté: ".$password_crypt;
else
echo "Erreur lors du cryptage du mot de passe.";
// ==> $password_crypt contient donc le mot de passe crypté
Conclusion
Once the password encrypted and encrypted signature, we can do the API call with parameters (If we follow the above example) :
- login = ikoulasupport ;
- crypted_password = base64_encode($password_crypt) ;
- signature = signature generated (see the signature generation process ==> Génération de la signature).
NB : Don't forget to url_encoder each parameter passed !
This article seem useful to you ?
Enable comment auto-refresher