Skip to content

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.

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

Operations sourced from internal/cognito/router.go in the kumolo repository.

Operation Supported
CreateUserPool ◐
DescribeUserPool ✓
UpdateUserPool ◐
DeleteUserPool ✓
ListUserPools ✓
GetUserPoolMfaConfig ◐
SetUserPoolMfaConfig ◐
AddCustomAttributes —
GetLogDeliveryConfiguration —
SetLogDeliveryConfiguration —
GetSigningCertificate —
Operation Supported
CreateUserPoolDomain —
UpdateUserPoolDomain —
DeleteUserPoolDomain —
DescribeUserPoolDomain —
Operation Supported
CreateUserPoolReplica —
UpdateUserPoolReplica —
DeleteUserPoolReplica —
ListUserPoolReplicas —
Operation Supported
CreateUserPoolClient ◐
DescribeUserPoolClient ✓
UpdateUserPoolClient ◐
DeleteUserPoolClient ✓
ListUserPoolClients ✓
AddUserPoolClientSecret —
DeleteUserPoolClientSecret —
ListUserPoolClientSecrets —
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 authentication
  • USER_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.

Operation Supported
GetUser ✓
UpdateUserAttributes ◐
DeleteUserAttributes —
DeleteUser ✓
GetUserAttributeVerificationCode ◐
VerifyUserAttribute ◐
GetUserAuthFactors —
SetUserMFAPreference ◐
SetUserSettings —
GetUICustomization —
SetUICustomization —
UpdateAuthEventFeedback —
Operation Supported
AdminCreateUser ◐
AdminGetUser ✓
AdminSetUserPassword ◐
AdminConfirmSignUp ✓
AdminDeleteUser ✓
AdminDisableUser ✓
AdminEnableUser ✓
AdminUpdateUserAttributes ◐
AdminDeleteUserAttributes —
AdminResetUserPassword —
AdminSetUserMFAPreference —
AdminSetUserSettings —
AdminListUserAuthEvents —
AdminUpdateAuthEventFeedback —
AdminDisableProviderForUser —
AdminLinkProviderForUser —
Operation Supported
ListUsers ◐
Operation Supported
CreateGroup ✓
GetGroup ✓
UpdateGroup ✓
DeleteGroup ✓
ListGroups ✓
ListUsersInGroup ✓
AdminAddUserToGroup ✓
AdminRemoveUserFromGroup ✓
AdminListGroupsForUser ✓
Operation Supported
ConfirmDevice —
ForgetDevice —
GetDevice —
ListDevices —
UpdateDeviceStatus —
AdminForgetDevice —
AdminGetDevice —
AdminListDevices —
AdminUpdateDeviceStatus —
Operation Supported
AssociateSoftwareToken ◐
VerifySoftwareToken ◐
StartWebAuthnRegistration —
CompleteWebAuthnRegistration —
DeleteWebAuthnCredential —
ListWebAuthnCredentials —
Operation Supported
CreateIdentityProvider —
DescribeIdentityProvider —
UpdateIdentityProvider —
DeleteIdentityProvider —
ListIdentityProviders —
GetIdentityProviderByIdentifier —
Operation Supported
CreateResourceServer —
DescribeResourceServer —
UpdateResourceServer —
DeleteResourceServer —
ListResourceServers —
Operation Supported
GetCSVHeader —
CreateUserImportJob —
DescribeUserImportJob —
StartUserImportJob —
StopUserImportJob —
ListUserImportJobs —
Operation Supported
DescribeRiskConfiguration —
SetRiskConfiguration —
Operation Supported
CreateManagedLoginBranding —
DescribeManagedLoginBranding —
DescribeManagedLoginBrandingByClient —
UpdateManagedLoginBranding —
DeleteManagedLoginBranding —
Operation Supported
CreateTerms —
DescribeTerms —
ListTerms —
UpdateTerms —
DeleteTerms —
Operation Supported
TagResource ✓
UntagResource ✓
ListTagsForResource ✓

Real cognito-idp returns Access-Control-Allow-Origin: * on every response with no configuration required — browser SDKs (amazon-cognito-identity-js, Amplify) depend on this to call it directly from a browser. kumolo matches this: Cognito’s actual response defaults to Access-Control-Allow-Origin: * even when KUMOLO_CORS_ALLOW_ORIGIN is unset. Setting the env var overrides the default with the configured origin instead.

DynamoDB, DynamoDB Streams, KMS, and STS are not designed for direct browser use on real AWS, so kumolo keeps their CORS support opt-in via KUMOLO_CORS_ALLOW_ORIGIN only — Cognito is the one exception.

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)
}