import json


def json_config_to_jwtauth(plaintext: str) -> dict:
    """Parse a Box application configuration JSON string into JWTAuth arguments.
    
    Arguments:
        plaintext {str} -- The Box app configuration JSON string.
    
    Returns:
        dict -- Arguments for the JWTAuth constructor. 
    """
    config = json.loads(plaintext)
    return {
        "client_id":
        config["boxAppSettings"]["clientID"],
        "client_secret":
        config["boxAppSettings"]["clientSecret"],
        "enterprise_id":
        config["enterpriseID"],
        "jwt_key_id":
        config["boxAppSettings"]["appAuth"]["publicKeyID"],
        "rsa_private_key_data":
        config["boxAppSettings"]["appAuth"]["privateKey"],
        "rsa_private_key_passphrase":
        config["boxAppSettings"]["appAuth"]["passphrase"]
    }