Amazon Cognito
๊ฐ๋จํ๊ณ ์์ ํ ์ฌ์ฉ์ ๊ฐ์ , ๋ก๊ทธ์ธ ๋ฐ ์ก์ธ์ค ์ ์ด
๋ฐ์ด๋ ์ฑ์ ๋ง๋๋ ๋ฐ ์๊ฐ์ ํ ์ ํ์ญ์์ค.
์ธ์ฆ์ Amazon Cognito๊ฐ ์ฒ๋ฆฌํ๊ฒ ์ต๋๋ค.
์์ ํ๊ณ ํ์ฅ ๊ฐ๋ฅํ ์ฌ์ฉ์ ๋๋ ํฐ๋ฆฌ
Amazon Cognito ์ฌ์ฉ์ ํ์ ์์ต ๋ช ์ ์ฌ์ฉ์๋ก ํ์ฅํ ์ ์๋ ์์ ํ ์ฌ์ฉ์ ๋๋ ํฐ๋ฆฌ๋ฅผ ์ ๊ณตํฉ๋๋ค. ์ฌ์ฉ์ ํ์ ์์ ๊ด๋ฆฌํ ์๋น์ค์ด๋ฏ๋ก ์๋ฒ ์ธํ๋ผ ๊ตฌ์ฑ์ ๋ํ ๊ฑฑ์ ์์ด ์์ฝ๊ฒ ์ค์ ํ ์ ์์ต๋๋ค.
Cognito ์ฌ์ฉ์ ํ์ ๋ํด ์์ธํ ์์๋ณด๊ธฐ
์์ ๋ฐ ์ํฐํ๋ผ์ด์ฆ ์๊ฒฉ ์ฆ๋ช ์ฐ๋
Amazon Cognito๋ฅผ ์ฌ์ฉํ๋ฉด ์ฌ์ฉ์๊ฐ SAML์ ์ง์ํ๋ Facebook, Google ๋ฐ Amazon๊ณผ ๊ฐ์ ์์ ์๊ฒฉ ์ฆ๋ช ๊ณต๊ธ์์ Microsoft Active Directory์ ๊ฐ์ ์ํฐํ๋ผ์ด์ฆ ์๊ฒฉ ์ฆ๋ช ๊ณต๊ธ์๋ฅผ ํตํด ๋ก๊ทธ์ธํ ์ ์์ต๋๋ค.
์ฐ๋์ ๋ํด ์์ธํ ์์๋ณด๊ธฐ
ํ์ค ๊ธฐ๋ฐ ์ธ์ฆ
Amazon Cognito ์ฌ์ฉ์ ํ์ ํ์ค ๊ธฐ๋ฐ ์๊ฒฉ ์ฆ๋ช ๊ณต๊ธ์์ด๋ฉฐ Oauth 2.0, SAML 2.0, OpenID Connect์ ๊ฐ์ ์๊ฒฉ ์ฆ๋ช ๋ฐ ์ก์ธ์ค ๊ด๋ฆฌ ํ์ค์ ์ง์ํฉ๋๋ค.
ํ์ค ๊ธฐ๋ฐ ์ธ์ฆ์ ๋ํด ์์ธํ ์์๋ณด๊ธฐ
์ฑ๊ณผ ์ฌ์ฉ์์ ๋ํ ๋ณด์
Amazon Cognito๋ Multi-Factor Authentication๊ณผ ์ ์ก ๋ฐ์ดํฐ ๋ฐ ์ ์ฅ ๋ฐ์ดํฐ ์ํธํ๋ฅผ ์ง์ํฉ๋๋ค. Amazon Cognito๋ HIPAA ์ ๊ฒฉ ์๋น์ค์ด๋ฉฐ, PCI DSS, SOC, ISO/IEC 27001, ISO/EIC 27017, ISO/EIC 27018 ๋ฐ ISO 9001์ ์ค์ํฉ๋๋ค.
๋ณด์ ๋ฐ ๊ท์ ์ค์์ ๋ํด ์์ธํ ์์๋ณด๊ธฐ
AWS ๋ฆฌ์์ค์ ๋ํ ์ก์ธ์ค ์ ์ด
Amazon Cognito๋ ์ฑ์ ๋ฐฑ์๋ ๋ฆฌ์์ค์ ๋ํ ์ก์ธ์ค๋ฅผ ์ ์ดํ๋ ์๋ฃจ์
์ ์ ๊ณตํฉ๋๋ค. ์ญํ ์ ์ ์ํ๊ณ ์ฌ์ฉ์๋ฅผ ์๋ก ๋ค๋ฅธ ์ญํ ์ ์ฐ๊ฒฐํ ์ ์์ผ๋ฏ๋ก ํด๋น ์ฌ์ฉ์์๊ฒ ์ก์ธ์ค ๊ถํ์ด ๋ถ์ฌ๋ ๋ฆฌ์์ค์๋ง ์ฑ์ด ์ก์ธ์คํ ์ ์์ต๋๋ค.
AWS ๋ฆฌ์์ค์ ๋ํ ์ก์ธ์ค ์ ์ด์ ๋ํด ์์ธํ ์์๋ณด๊ธฐ
์ฝ๊ฒ ์ฑ๊ณผ ํตํฉ
์๊ฒฉ ์ฆ๋ช
๊ณต๊ธ์ ์ฐ๋์ ์ํ ๊ธฐ๋ณธ UI์ ๊ฐํธํ ๊ตฌ์ฑ์ ์ฌ์ฉํด Amazon Cognito๋ฅผ ํตํฉํ์ฌ ๋ช ๋ถ ๋ง์ ์ฑ์ ์ฌ์ฉ์ ๊ฐ์
, ๋ก๊ทธ์ธ ๋ฐ ์ก์ธ์ค ์ ์ด ๊ธฐ๋ฅ์ ์ถ๊ฐํ ์ ์์ต๋๋ค. UI๋ฅผ ์ฌ์ฉ์ ์ง์ ํ์ฌ ๋ชจ๋ ์ฌ์ฉ์ ์ํธ ์์ฉ ํ๋ฉด์ ํ์ฌ ๋ธ๋๋๋ฅผ ๋ฃ์ ์ ์์ต๋๋ค.
์ ์ํ๊ฒ Amazon Cognito๋ฅผ ์ฑ์ ํตํฉํ๋ ๋ฐฉ๋ฒ ์์๋ณด๊ธฐ
์ ๋ง ๊ฐ๋จํฉ๋๋ค
-
iOS Objective C
-
Android
-
iOS Swift
-
์น ์ฑ
-
iOS Objective C
-
SDK์ ์ฝ๋ ๋ช ์ค๋ก ์ฌ์ฉ์๋ฅผ ๋ก๊ทธ์ธ์ํค๊ณ ํ ํฐ์ ๊ฐ์ ธ์ฌ ์ ์์ต๋๋ค.
// iOS Objective-C // AppDelegate.m - (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey, id> *)options { return [[AWSCognitoAuth defaultCognitoAuth] application:app openURL:url options:options]; } // ViewController.m AWSCognitoAuth * cognitoAuth = [AWSCognitoAuth defaultCognitoAuth]; [cognitoAuth getSession:self completion:^(AWSCognitoAuthUserSession * _Nullable session, NSError * _Nullable error) { if(error) { NSLog(@"Error: %@", error.userInfo[@"error"]); } else { //Do something with session NSLog(@"Claims: %@", t.result.idToken.claims); } }]; -
Android
-
SDK์ ์ฝ๋ ๋ช ์ค๋ก ์ฌ์ฉ์๋ฅผ ๋ก๊ทธ์ธ์ํค๊ณ ํ ํฐ์ ๊ฐ์ ธ์ฌ ์ ์์ต๋๋ค.
//Android // 1) -- Create an instance of Auth -- Auth.Builder builder = new Auth.Builder() .setAppClientId(getString(R.string.cognito_client_id)); .setAppCognitoWebDomain(getString(R.string.cognito_web_domain)); .setApplicationContext(getApplicationContext()); .setAuthHandler(new callback()); .setSignInRedirect(getString(R.string.app_redirect_signin)); .setSignOutRedirect(getString(R.string.app_redirect_signout)); .setScopes(userScopes); auth = builder.build(); // 2) โ Set up url redirect in your app manifest -- <intent-filter> <data android:host="YOUR_REDIRECT_URI_AUTHORITY"android:scheme="YOUR_REDIRECT_SCHEME"/> </intent-filter> // 3) -- Get tokens for your user -- auth.getSession(); -
iOS Swift
-
SDK์ ์ฝ๋ ๋ช ์ค๋ก ์ฌ์ฉ์๋ฅผ ๋ก๊ทธ์ธ์ํค๊ณ ํ ํฐ์ ๊ฐ์ ธ์ฌ ์ ์์ต๋๋ค.
// iOS Swift // AppDelegate.swift func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool { return AWSCognitoAuth.default().application(app, open: url, options: options) } // ViewController.swift let cognitoAuth = AWSCognitoAuth.default() cognitoAuth.getSession(self) { (session:AWSCognitoAuthUserSession?, error:Error?) in if(error != nil) { print((error! as NSError).userInfo["error"] as? String) }else { //Do something with session } } -
์น ์ฑ
-
SDK์ ์ฝ๋ ๋ช ์ค๋ก ์ฌ์ฉ์๋ฅผ ๋ก๊ทธ์ธ์ํค๊ณ ํ ํฐ์ ๊ฐ์ ธ์ฌ ์ ์์ต๋๋ค.
// Add amazon-cognito-auth-js SDK in your application. //1) -- Create an instance of Auth -- var authData = { ClientId : '<add ClientId>', AppWebDomain : '<add App Web Domain>', TokenScopesArray : '<add scope array>', RedirectUriSignIn : '<add redirect url when signed in>', RedirectUriSignOut : '<add redirect url when signed out>' }; var auth = new AWSCognito.CognitoIdentityServiceProvider.CognitoAuth(authData); // 2) -- Get tokens for your user -- auth.getSession();
์ฌ์ฉํ ๋งํผ๋ง ๋น์ฉ์ ์ง๋ถํ๋ฉฐ, ์ต์ ๋น์ฉ์ด ์์ต๋๋ค.
์ฌ์ฉ์ ํ์ ์์ฑํ๋ ๋ฐ Amazon Cognito ์๊ฒฉ ์ฆ๋ช ์ ์ฌ์ฉํ๋ ๊ฒฝ์ฐ, ์๋ณ ํ์ฑ ์ฌ์ฉ์(MAU)๋ง์ ๊ธฐ์ค์ผ๋ก ๋น์ฉ์ ์ง๋ถํฉ๋๋ค. ํด๋น ์ญ์ ๋ด์ ๊ฐ์ , ๋ก๊ทธ์ธ, ํ ํฐ ์๋ก ๊ณ ์นจ ๋๋ ์ํธ ๋ณ๊ฒฝ๊ณผ ๊ฐ์ด ํด๋น ์ฌ์ฉ์์ ๊ด๋ จ๋ ์๊ฒฉ ์ฆ๋ช ์์ ์ด ๋ฐ์ํ ๊ฒฝ์ฐ, ์ฌ์ฉ์๋ MAU๋ก ๊ฐ์ฃผ๋ฉ๋๋ค. ํ์ ์ธ์ ์ด๋ ํด๋น ์ญ์์ ๋นํ์ฑ ์ฌ์ฉ์์ ๋ํด์๋ ์๊ธ์ด ๋ถ๊ณผ๋์ง ์์ต๋๋ค.
| ์๊ธ ๊ณ์ธต(MAU) | MAU๋น ์๊ธ |
| ์ฒ์ 50,000 | ๋ฌด๋ฃ |
| ๋ค์ 50,000 | 0.00550 USD |
| ๋ค์ 900,000 | 0.00460 USD |
| ๋ค์ 9,000,000 | 0.00325 USD |
| 10,000,000 ์ด๊ณผ | 0.00250 USD |
SAML ์ฐ๋์ ํตํด ๋ก๊ทธ์ธํ๋ ์ฌ์ฉ์์ ๊ฒฝ์ฐ, 50๋ช
์ ํ๋ฆฌ ํฐ์ด ์ด๊ณผ ์ ์๊ธ์ MAU๋น 0.45 USD์
๋๋ค. ์ฌ์ฉ์๊ฐ 10,000๋ช
์ด์์ธ ๊ฒฝ์ฐ AWS์ ๋ง์ถคํ ์๊ธ์ ๋ฌธ์ํ์๊ธฐ ๋ฐ๋๋๋ค. Amazon Cognito์์๋ ์ฐ๋ ์๊ฒฉ ์ฆ๋ช
๊ธฐ๋ฅ์ ์ฌ์ฉํ์ฌ ๊ถํ์ด ์๋ ์ฌ์ฉ์ ๋๋ ๊ฒ์คํธ ์ฌ์ฉ์์ ๋ํ AWS ์๊ฒฉ ์ฆ๋ช
์ ํ๋ณดํ๋ ๋น์ฉ์ด ๋ฌด๋ฃ์
๋๋ค. AWS ์๊ธ์ ์ฌ๊ธฐ์์ ์์ธํ ์์๋ณด์ญ์์ค.
AWS ์์ํ๊ธฐ
AWS๋ฅผ ์ฌ์ฉํ์ฌ ๊ตฌ์ถ์ ์์ํ์ญ์์ค

