Cognito
kumolo implements the Cognito User Pools REST API. All operations accept standard AWS SDK v2 requests — point your client at http://localhost:5566.
Unlike S3, UsePathStyle is not required; only BaseEndpoint needs to be overridden on the client.
A JWKS endpoint is available at http://localhost:5566/{userPoolId}/.well-known/jwks.json for JWT verification.
Support levels
Section titled “Support levels”| Symbol | Meaning |
|---|---|
| ✓ | Fully implemented — the feature behaves like real AWS |
| ◐ | Partial support — the operation works but has known limitations; see the note for details |
| — | Not yet implemented |
Operation support
Section titled “Operation support”Operations sourced from internal/cognito/router.go in the kumolo repository.
User pool management
Section titled “User pool management”| Operation | Supported |
|---|---|
CreateUserPool |
◐ |
DescribeUserPool |
✓ |
UpdateUserPool |
◐ |
DeleteUserPool |
✓ |
ListUserPools |
✓ |
GetUserPoolMfaConfig |
◐ |
SetUserPoolMfaConfig |
◐ |
AddCustomAttributes |
— |
GetLogDeliveryConfiguration |
— |
SetLogDeliveryConfiguration |
— |
GetSigningCertificate |
— |
User pool domains
Section titled “User pool domains”| Operation | Supported |
|---|---|
CreateUserPoolDomain |
— |
UpdateUserPoolDomain |
— |
DeleteUserPoolDomain |
— |
DescribeUserPoolDomain |
— |
User pool replicas
Section titled “User pool replicas”| Operation | Supported |
|---|---|
CreateUserPoolReplica |
— |
UpdateUserPoolReplica |
— |
DeleteUserPoolReplica |
— |
ListUserPoolReplicas |
— |
User pool clients
Section titled “User pool clients”| Operation | Supported |
|---|---|
CreateUserPoolClient |
◐ |
DescribeUserPoolClient |
✓ |
UpdateUserPoolClient |
◐ |
DeleteUserPoolClient |
✓ |
ListUserPoolClients |
✓ |
AddUserPoolClientSecret |
— |
DeleteUserPoolClientSecret |
— |
ListUserPoolClientSecrets |
— |
Authentication
Section titled “Authentication”| Operation | Supported |
|---|---|
SignUp |
◐ |
ConfirmSignUp |
✓ |
ResendConfirmationCode |
◐ |
InitiateAuth |
◐ |
RespondToAuthChallenge |
◐ |
AdminInitiateAuth |
— |
AdminRespondToAuthChallenge |
— |
ForgotPassword |
◐ |
ConfirmForgotPassword |
◐ |
ChangePassword |
◐ |
GetTokensFromRefreshToken |
— |
RevokeToken |
✓ |
GlobalSignOut |
✓ |
AdminUserGlobalSignOut |
— |
InitiateAuth supports the following auth flows:
USER_PASSWORD_AUTH— username and password authenticationUSER_SRP_AUTH— SRP-6a authentication (used by AWS Amplify by default)REFRESH_TOKEN_AUTH— exchange a refresh token for new tokens
RespondToAuthChallenge supports the NEW_PASSWORD_REQUIRED, PASSWORD_VERIFIER, SOFTWARE_TOKEN_MFA, and MFA_SETUP challenges.
User operations
Section titled “User operations”| Operation | Supported |
|---|---|
GetUser |
✓ |
UpdateUserAttributes |
◐ |
DeleteUserAttributes |
— |
DeleteUser |
✓ |
GetUserAttributeVerificationCode |
◐ |
VerifyUserAttribute |
◐ |
GetUserAuthFactors |
— |
SetUserMFAPreference |
◐ |
SetUserSettings |
— |
GetUICustomization |
— |
SetUICustomization |
— |
UpdateAuthEventFeedback |
— |
Admin operations
Section titled “Admin operations”| Operation | Supported |
|---|---|
AdminCreateUser |
◐ |
AdminGetUser |
✓ |
AdminSetUserPassword |
◐ |
AdminConfirmSignUp |
✓ |
AdminDeleteUser |
✓ |
AdminDisableUser |
✓ |
AdminEnableUser |
✓ |
AdminUpdateUserAttributes |
◐ |
AdminDeleteUserAttributes |
— |
AdminResetUserPassword |
— |
AdminSetUserMFAPreference |
— |
AdminSetUserSettings |
— |
AdminListUserAuthEvents |
— |
AdminUpdateAuthEventFeedback |
— |
AdminDisableProviderForUser |
— |
AdminLinkProviderForUser |
— |
User listing
Section titled “User listing”| Operation | Supported |
|---|---|
ListUsers |
◐ |
Group management
Section titled “Group management”| Operation | Supported |
|---|---|
CreateGroup |
✓ |
GetGroup |
✓ |
UpdateGroup |
✓ |
DeleteGroup |
✓ |
ListGroups |
✓ |
ListUsersInGroup |
✓ |
AdminAddUserToGroup |
✓ |
AdminRemoveUserFromGroup |
✓ |
AdminListGroupsForUser |
✓ |
Device management
Section titled “Device management”| Operation | Supported |
|---|---|
ConfirmDevice |
— |
ForgetDevice |
— |
GetDevice |
— |
ListDevices |
— |
UpdateDeviceStatus |
— |
AdminForgetDevice |
— |
AdminGetDevice |
— |
AdminListDevices |
— |
AdminUpdateDeviceStatus |
— |
MFA & WebAuthn
Section titled “MFA & WebAuthn”| Operation | Supported |
|---|---|
AssociateSoftwareToken |
◐ |
VerifySoftwareToken |
◐ |
StartWebAuthnRegistration |
— |
CompleteWebAuthnRegistration |
— |
DeleteWebAuthnCredential |
— |
ListWebAuthnCredentials |
— |
Identity providers
Section titled “Identity providers”| Operation | Supported |
|---|---|
CreateIdentityProvider |
— |
DescribeIdentityProvider |
— |
UpdateIdentityProvider |
— |
DeleteIdentityProvider |
— |
ListIdentityProviders |
— |
GetIdentityProviderByIdentifier |
— |
Resource servers
Section titled “Resource servers”| Operation | Supported |
|---|---|
CreateResourceServer |
— |
DescribeResourceServer |
— |
UpdateResourceServer |
— |
DeleteResourceServer |
— |
ListResourceServers |
— |
User import
Section titled “User import”| Operation | Supported |
|---|---|
GetCSVHeader |
— |
CreateUserImportJob |
— |
DescribeUserImportJob |
— |
StartUserImportJob |
— |
StopUserImportJob |
— |
ListUserImportJobs |
— |
Risk configuration
Section titled “Risk configuration”| Operation | Supported |
|---|---|
DescribeRiskConfiguration |
— |
SetRiskConfiguration |
— |
Managed login branding
Section titled “Managed login branding”| Operation | Supported |
|---|---|
CreateManagedLoginBranding |
— |
DescribeManagedLoginBranding |
— |
DescribeManagedLoginBrandingByClient |
— |
UpdateManagedLoginBranding |
— |
DeleteManagedLoginBranding |
— |
| Operation | Supported |
|---|---|
CreateTerms |
— |
DescribeTerms |
— |
ListTerms |
— |
UpdateTerms |
— |
DeleteTerms |
— |
Tagging
Section titled “Tagging”| Operation | Supported |
|---|---|
TagResource |
✓ |
UntagResource |
✓ |
ListTagsForResource |
✓ |
Quick start
Section titled “Quick start”package main
import ( "context" "fmt"
"github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/config" "github.com/aws/aws-sdk-go-v2/credentials" "github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider" "github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider/types")
func main() { cfg, err := config.LoadDefaultConfig(context.Background(), config.WithRegion("us-east-1"), config.WithCredentialsProvider( credentials.NewStaticCredentialsProvider("test", "test", ""), ), ) if err != nil { panic(err) }
client := cognitoidentityprovider.NewFromConfig(cfg, func(o *cognitoidentityprovider.Options) { o.BaseEndpoint = aws.String("http://localhost:5566") })
// Create a user pool pool, err := client.CreateUserPool(context.Background(), &cognitoidentityprovider.CreateUserPoolInput{ PoolName: aws.String("my-pool"), }) if err != nil { panic(err) } userPoolID := pool.UserPool.Id
// Create a user pool client appClient, err := client.CreateUserPoolClient(context.Background(), &cognitoidentityprovider.CreateUserPoolClientInput{ UserPoolId: userPoolID, ClientName: aws.String("my-app"), ExplicitAuthFlows: []types.ExplicitAuthFlowsType{ types.ExplicitAuthFlowsTypeAllowUserPasswordAuth, }, }) if err != nil { panic(err) } clientID := appClient.UserPoolClient.ClientId
// Sign up a user (confirmation code is logged to the kumolo server log) _, err = client.SignUp(context.Background(), &cognitoidentityprovider.SignUpInput{ ClientId: clientID, Username: aws.String("alice"), Password: aws.String("P@ssw0rd!"), }) if err != nil { panic(err) }
// Admin confirm so no code retrieval is needed in tests _, err = client.AdminConfirmSignUp(context.Background(), &cognitoidentityprovider.AdminConfirmSignUpInput{ UserPoolId: userPoolID, Username: aws.String("alice"), }) if err != nil { panic(err) }
// Authenticate auth, err := client.InitiateAuth(context.Background(), &cognitoidentityprovider.InitiateAuthInput{ ClientId: clientID, AuthFlow: types.AuthFlowTypeUserPasswordAuth, AuthParameters: map[string]string{ "USERNAME": "alice", "PASSWORD": "P@ssw0rd!", }, }) if err != nil { panic(err) } fmt.Println("AccessToken:", *auth.AuthenticationResult.AccessToken)}import boto3
client = boto3.client( "cognito-idp", region_name="us-east-1", endpoint_url="http://localhost:5566", aws_access_key_id="test", aws_secret_access_key="test",)
# Create a user poolpool = client.create_user_pool(PoolName="my-pool")user_pool_id = pool["UserPool"]["Id"]
# Create a user pool clientapp_client = client.create_user_pool_client( UserPoolId=user_pool_id, ClientName="my-app", ExplicitAuthFlows=["ALLOW_USER_PASSWORD_AUTH"],)client_id = app_client["UserPoolClient"]["ClientId"]
# Sign up a userclient.sign_up( ClientId=client_id, Username="alice", Password="P@ssw0rd!",)
# Admin confirmclient.admin_confirm_sign_up(UserPoolId=user_pool_id, Username="alice")
# Authenticateauth = client.initiate_auth( ClientId=client_id, AuthFlow="USER_PASSWORD_AUTH", AuthParameters={"USERNAME": "alice", "PASSWORD": "P@ssw0rd!"},)print("AccessToken:", auth["AuthenticationResult"]["AccessToken"])# Create a user poolPOOL_ID=$(aws cognito-idp create-user-pool \ --pool-name my-pool \ --endpoint-url http://localhost:5566 \ --region us-east-1 \ --query 'UserPool.Id' --output text)
# Create a user pool clientCLIENT_ID=$(aws cognito-idp create-user-pool-client \ --user-pool-id "$POOL_ID" \ --client-name my-app \ --explicit-auth-flows ALLOW_USER_PASSWORD_AUTH \ --endpoint-url http://localhost:5566 \ --region us-east-1 \ --query 'UserPoolClient.ClientId' --output text)
# Sign up a useraws cognito-idp sign-up \ --client-id "$CLIENT_ID" \ --username alice \ --password 'P@ssw0rd!' \ --endpoint-url http://localhost:5566 \ --region us-east-1
# Admin confirmaws cognito-idp admin-confirm-sign-up \ --user-pool-id "$POOL_ID" \ --username alice \ --endpoint-url http://localhost:5566 \ --region us-east-1
# Authenticateaws cognito-idp initiate-auth \ --client-id "$CLIENT_ID" \ --auth-flow USER_PASSWORD_AUTH \ --auth-parameters USERNAME=alice,PASSWORD='P@ssw0rd!' \ --endpoint-url http://localhost:5566 \ --region us-east-1